How to receive stream of bytes using PIC USART


Results 1 to 35 of 35

Threaded View

  1. #10
    Join Date
    Jun 2009
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    I have tried with sending out data bytes that received from the modules to PC immediately but the data displayed on the PC is different from the data that I connected the module directly to PC. It seems like the data of the bytes stream corrupts when it passes through the PIC.

    This is the testing code:

    Code:
    INCLUDE "modedefs.bas"
    DEFINE LOADER_USED 1    	
    DEFINE OSC 20 
    B0 VAR BYTE
    
    'PB.7 = Rx, PB.6 = Tx
    TRISB = %10000000 
    
    loop:
    '4800 baud rate
    'read byte from SpO2 module
    SerIn2 PORTB.7,16572,[B0]
    'send byte to PC
    SerOut2 PORTB.6,16572,[B0]
    GoTo loop
    End
    What should I do to avoid the data from crashing in Rx buffer of PIC UART, provided I cannot control over the stream of bytes received?
    Last edited by unifoxz; - 14th June 2009 at 04:00.

Similar Threads

  1. Replies: 6
    Last Post: - 31st August 2007, 10:31
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 09:12
  3. 16F876 Usart Receive
    By syscoder in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st March 2007, 16:43
  4. Replies: 1
    Last Post: - 6th September 2005, 17:32
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th March 2005, 00:14

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