hserout nothing transmit


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    66

    Question hserout nothing transmit

    I'm using PIC16f877 connected to MAX232. Using serout no problem, but when i use the following, nothing appears in hyperterminal

    Code:
    define OSC 20
    
    DEFINE HSER_BAUD 9600 ' Select the baud rate
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    	DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
    	DEFINE HSER_SPBRG 31  ' 20MHZ 9600, brgh=0
    	DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    
    OPTION_REG.7 = 0     'enable internal pull up GPPU
    OPTION_REG.6 = 1     'falling edge INT
    ADCON1= %00000111      
    TRISE = 0             ' all output
    TRISC = %10000000
    
    
    
    loop:
            pause 1000  
            low led   
                 
            Hserout ["Hello World", 13, 10] 
           goto loop

  2. #2
    Join Date
    Aug 2008
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    Thread close. I discovered one wire came off from the breadboard connected to MAX232 IC.

    No problem.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Do you get something or just garbage character?

    I would suggest you to use the following settings
    Code:
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    EDIT: seems we hit the buton at the same time or so... anyways, keep thse settings above handy... produce a better error %
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. I2C Slave with a PIC
    By ralfmayr in forum mel PIC BASIC Pro
    Replies: 129
    Last Post: - 21st August 2016, 17:44
  2. hserin and sms controller
    By xxxxxx in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 10th February 2010, 15:49
  3. HSEROUT and Commas, What? Help Me Understand
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th July 2009, 19:12
  4. Is HSEROUT corrupting bit 7 ?????
    By Robert Wells in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd October 2008, 16:26
  5. Controlling an 240x128 LCD Touchpanel Display
    By Vincent in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 7th June 2006, 23:36

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