Shop OBEX P1 Docs P2 Docs Learn Events
Send Data to PC via Serial Port — Parallax Forums

Send Data to PC via Serial Port

pusinkpusink Posts: 68
edited 2007-03-14 16:43 in General Discussion
i already make the RFID circuit same like example circuit inside the Sx-key software. I want to try send data (serial numbur from tag) to PC via serial port and read the data using vb6. Can give me the sample code in SXB, how to send data to pc via serial port. I'm using SX28 Chip.

Comments

  • BeanBean Posts: 8,129
    edited 2007-03-14 13:19
    That demo project send the data to a serial LCD. Instead of connecting to an LCD connect to the PC serial port.
    Depending on your circuit (MAX232 or whatever), you may need to change the LCDBaud parameter.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A problem well defined is a problem half solved"

    "Just because you're approved, doesn't mean you can afford it."
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Cheap used 4-digit LED display with driver IC·www.hc4led.com
    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Coming soon! Propeller based OSD module www.hittconsulting.com
    ·
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-14 16:43
    If you're going through an inverter (e.g. MAX232) you do need to set the baud mode to True, like this:

    Baud    CON    "T9600"
    



    If you're going direct (possible, but not always reliable) you need to use iNverted mode:

    Baud    CON    "N9600"
    



    Once Baud is defined it's just a matter of using SERIN and SEROUT. Note: If you want to use a direct connection for SERIN from a PC, you need to put a 22K resistor between the PC's TX pin (pin 3 on a DB-9) and your SX I/O pin. This resistor isn't required with the MAX232 circuit.
Sign In or Register to comment.