Code:
T2CON = %00010101 ' Turn on Timer2, Prescale=4
'
'
'
duty = 100 ' Set duty cycle to 20%
1. your prescaler is not set to 1:16 as said in the calc. Now, it's set to 1:4. Have a look in datasheet section 8.0 register 8-1 T2CON. you'll discover you need to use T2CON=%00000110
2. duty=100 set a duty cycle of 16%... still as per the calc. 20% Duty=125
Code:
SerIn SI,T9600,,duty
i think it's invalid.
you should try
Code:
SerIn SI,T9600,#duty
In Microcode Studio serial communicator, you have access to the settings. Right to 'send' button there's a little arrow.. click on it, go to line terminator, then check 'No terminator'
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks