read/write to internal registers?

Status
Not open for further replies.

tuanvoi

New Member
hi all,
Could you please show me how to read/write to internal registers such as Timer, HIGH/LOW-VOLTAGE DETECT(HLVD) register for pic18f4550? Thank you a lot.
Tom
 
I wonder which compiler ur using. Assuming it is the C18 or some other C compiler all U need to do is jus write
TMRO=0x00; writes 00 in hex to TMRO SFR
similarly U can do with all other SFRS provided that U have already included the ehader file having the details of all other SfRs in ur PROJECT worksapace.
Good LUCk MATE
 
He could even be using an assembler.

The registers are defined by a processor definition file. In asm it would be an include file like processorName.inc. In C it is a header file , for C18 it would be processorName.h.

The register names and how to access them are determined by these file. Study them.
 
hi,
I'm using CCS C compiler. How would I read/write? Thanks
Sorry, I'm new to this thing.
Tom
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…