Menu

Serial problem

Help
Anonymous
2011-02-22
2013-05-30
  • Anonymous

    Anonymous - 2011-02-22

    Please see code below. I only get FF in the terminal window.

    It is connected via a MAX232 circuit.

    #chip 18lf14k22, 16
    #config  osc=int

    #define port1 portc.1  
    #define port2 portc.2  

    #define sendAhigh set portc.2 on
    #define sendAlow set portc.2 off

    dir portc.1 out
    dir portc.2 out

    initser 1,r4800,1,8,1,none,normal

    Main:

    do
    set port1 on
    sersend 1, "hello world"
    wait 100 ms

    loop

     
  • Mauried

    Mauried - 2011-02-22

    The 18lf14k22 has a hardware uart.
    You will get much more reliable results
    if you use the onboard uart rather than
    the SW driven uart.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.