PICKit 2 USART


Closed Thread
Results 1 to 4 of 4

Thread: PICKit 2 USART

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    You haven't enabled the serial port according to the PBP manual. All you've done is set the baud rate. That's it. HSERIN/HSEROUT are talking to a register that 'doesn't care' until you set the right DEFINEs.
    Have a look, add the code, see what happens.

  2. #2
    Join Date
    Nov 2006
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Hi

    I had added in the Define as below. I'm using PIC16F877A and 4 MHz.
    I enter "a" and click send. There are nothing echo back. "a" only show once when the echo button is checked.
    Any idea???


    Code:
    DEFINE OSC 4
    
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 20h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_SPBRG 6
    DEFINE HSER_CLROERR 1
    
    datain VAR BYTE
    
    main:
    
         HSerin [datain]
         HSerout [datain]
         
    GoTo main
    Any suggestion ???

    Thanks

    Peter
    Attached Files Attached Files
    Last edited by DragonBall_6; - 17th December 2008 at 14:14.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Did you try swapping the Rx/Tx pins on one end?
    And while you're at it, try 2400 baud, instead of 9600. Yes, 9600 should work...but 2400 should be a bit more reliable if there are other problems.

Similar Threads

  1. Unpacking a PICkit 2 Programmer/Debugger
    By duncan303 in forum General
    Replies: 20
    Last Post: - 14th May 2009, 21:24
  2. PICkit 2 and RBC interrupts
    By jderson in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 4th April 2009, 02:33
  3. PicKit 2 Questions
    By dmairspotter in forum General
    Replies: 3
    Last Post: - 11th November 2007, 21:10
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. Programming from MicroStudio to a PICKit 2
    By jblackann in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th November 2006, 03:56

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