Hi Dave
:-)
So are you saying I should use 8MHz OSC and 4x PLL for the 18F4520 and use 32 MHz when I do the HSER DEFINE calculations then ?
And on the 16F887 use it's max INTOSC which is 8 MHZ for the HSER calculations ?
OR....
set both PIC's at 4 or 8 MHz and then calculate the HSER DEFINEs accordingly ?
Something like this maybe
A quick question here ...Code:‘For 8MHz @ 2400bps RCSTA = $90 ' Enable serial port & continuous receive TXSTA = $20 ' Enable transmit, BRGH = 0 SPBRG = 51 ' 2400 Baud @ 8MHz, 0.17% DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0 DEFINE HSER_SPBRG 51 ' 2400 Baud @ 8MHz, 0.17% DEFINE HSER_CLROERR 1 ' Clear overflow automatically ‘For 4 MHz @ 2400bps RCSTA = $90 ' Enable serial port & continuous receive TXSTA = $20 ' Enable transmit, BRGH = 0 SPBRG = 25 ' 2400 Baud @ 4MHz, 0.17% DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0 DEFINE HSER_SPBRG 25 ' 2400 Baud @ 4MHz, 0.17% DEFINE HSER_CLROERR 1 ' Clear overflow automatically
Which comes first ... DEFINE's or register settings ?
Chat soon
Dennis




Bookmarks