Programming counters using PropGCC
GuruSantiago
Posts: 3
I am woking on some C code to use the propeller counters, but I am having problems accessing CTRA register.
Is there sample code available?
I am trying to rewrite the Counter Modules and Circuit application lab code in C.
Is there sample code available?
I am trying to rewrite the Counter Modules and Circuit application lab code in C.
Comments
Hi there.
The propeller.h and cog.h headers provide access to CTRA and other special purpose registers.
PropellerGCC docmentation is on www.parallax.com/propellergcc and www.propgcc.googlecode.com
https://sites.google.com/site/propellergcc/documentation/libraries/propeller-h-library
https://sites.google.com/site/propellergcc/documentation/libraries/cog-h-library
Register are accessed like variables. The names are declared as volatile so they will not be optimized away.