16f887 and hserin/out


Results 1 to 13 of 13

Threaded View

  1. #8
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    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.

Similar Threads

  1. HSERIN/OUT Wrong
    By Kaldurenik in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th October 2007, 10:40
  2. HSERIN/OUT or Serin/Out for AIR Link
    By mankan in forum General
    Replies: 4
    Last Post: - 25th May 2006, 15:19
  3. Hserin
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 20th March 2006, 23:09

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts