Simple RS232 Program


Closed Thread
Results 1 to 2 of 2
  1. #1
    BlackNoir's Avatar
    BlackNoir Guest

    Default Simple RS232 Program

    I'm looking for a simple PBP proram to get me started with using the serial port to communicate with a PIC, either using the Max232 or the following:
    http://www.piclist.com/techref/io/serial/RCL1.htm

    Thanks,
    BlackNoir

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I assume you are using the Hardware serial port - so:


    DEFINE OSC XX <- replace XX with your oscillator frequency
    DEFINE HSER_RCSTA 90H
    DEFINE HSER_TXSTA 20H
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1

    TRISC = %10000000

    InChar VAR BYTE

    HSEROUT ["Hello World",13,10]

    Loop:
    HSERIN [InChar]
    HSEROUT [" ",InChar,13,10]
    GOTO Loop
    Charles Linquist

Similar Threads

  1. Simple Blink program doesnt work.
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st March 2009, 20:30
  2. Help with simple program
    By mykewl in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st July 2008, 08:58
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. Simple Interrupt Program
    By eoasap in forum General
    Replies: 5
    Last Post: - 28th October 2005, 16:22
  5. simple program, what am i missing
    By scorpion in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th September 2005, 18:45

Members who have read this thread : 1

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