From Mr_e's calculator using 8mhz and 2400 baud:
Code:
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
RCSTA = $90 ' Enable serial port & continuous receive
TXSTA = $20 ' Enable transmit, BRGH = 0
SPBRG = 51 ' 2400 Baud @ 8MHz, 0.17%
for 16f690 :
Code:
DEFINE LCD_COMMANDUS 2000 ' Set command delay time in us
DEFINE LCD_DATAUS 50 ' Set data delay time in us
' = = = = = Set analog functions to off condition = = =
ADCON0 = 0
ADCON1=0
ANSEL = 0
ANSELH = 0
CM1CON0 = 0
CM2CON0 = 0
OERR VAR RCSTA.1 ' Alias OERR (USART Overrun Error Flag)
CREN VAR RCSTA.4 ' Alias CREN (USART Continuous Receive Enable)
CREN = 0 ' Disable continuous receive to clear overrun flag
CREN = 1 ' Enable continuous receive
Go Here and look at post 16"
http://www.picbasic.co.uk/forum/show...light=backpack
Post your non working code for the 690 so we can wrench on it a bit.
Last edited by Archangel; - 19th December 2009 at 00:31.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks