PicBasic Pro PIC18LF45J10 Hserin2 problem


Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Sep 2013
    Location
    Hobart Tasmania
    Posts
    2

    Default PicBasic Pro PIC18LF45J10 Hserin2 problem

    Hello all

    I am having problems reading a configurable serial port of a PIC 18LF. I am able to send data but unable to make sense of any of the data received. I have attached the cut down code I have been working on)

    Observations:
    1. The Define HSER2_BAUD instruction does not appear to set up the Pic's baud rate generator, I have to do this manually to get it working correctly.
    2. Once configured I am able to send a small test string "hello world" however it is proceeded by a zero. This is not too much of a problem, I am sure I can sort something out to resolve that issue.
    3. When I type a character to be received by the pic through an RS232 interface, the characters received are unintelligible.
    Things I have checked.
    1. I have checked using a scope that the RS232 driver is sending the data correctly to the pick. The letter "A" or any other character is observed to be arriving at the UART of the pic correctly and in the right phase (not inverted)
    2. I have sent the received data to an LCD to be displayed as well as sending the received character out to a terminal, in both circumstances the data is unintelligible.
    3. I have looked directly at the RCREG2 to ensure there was no problem there but what I see is the same unintelligible data.
    4. I have checked that I have the correct re-mappable pin for the UART. (The RX interrupt does not work if I select any other pin, in other words the UART is reacting to the data received)
    5. I have set BAUDCON2.3 = 1 to enable the UART to wake up from sleep mode, without this bit set, the UART does not wake up the PIC.
    I have spent some time on this now and I am clearly not getting anywhere. I am about to check UART1 operation to confirm if I have the same problem but as I have limited access to this port (it will be talking to another device) it’s a little more complicated. In the meantime if anyone could shed some light on the matter I would be very grateful.

    Cheers
    Ant
    Attached Files Attached Files

Similar Threads

  1. PicBasic Pro Upgrade to 2.6 problem
    By dirtbiker5627 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th May 2010, 03:22
  2. picbasic pro problem
    By Marin in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th April 2010, 14:31
  3. PicBasic Pro problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th March 2007, 22:22
  4. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  5. Math problem...with picbasic pro
    By pcaccia in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th October 2005, 19:28

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