Setting up UART and some coding issues


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    hi dennis,
    ya, im using 20MHz crystal, and i can blink LED with the C code UART example...
    i use MPlab v8.xx ,melab PicBasic Pro as compiler, and PICKIT 2 as programmer...
    does the difference of programmer will affect the result?? sorry for noob question

    best regards

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    does the difference of programmer will affect the result?? sorry for noob question
    No, the programmer will not make a difference.

    Try this without the MAX232. Connect PORTC.6 to pin #2 of the serial port as shown in the manual. Have the terminal program set for 9600 baud, 8,N,1.
    Code:
    DEFINE OSC 20
    X  VAR BYTE
    START:
    X = X + 1
    SEROUT2 PORTC.6, 16468, ["HELLO WORLD",$d,$a]
    SEROUT2 PORTC.6, 16468, [DEC X,$d,$a]
    PAUSE 1000
    GOTO START
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 2

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