I'm new here and I was having some problems working with bits.
I've included the 8051.h library and I get the following error when I try to:
" set TR0; " or " clr TR0; "
syntax error: token -> 'TR0' ; column 9
I assume that I got the syntax wrong but I couldn't find correct syntax in the documentation.
Also is the following syntax correct for using an interrupt ?
"void timer0_int() __interrupt (1) __using (0)
Sorry for the "noobish" questions.
Thanks in advance, Mike.
For the bit variables use:
TR0 = 0;
TR0 = 1;
The syntax for your interrupt service routine looks fine.
Oh, so that's how you do it.