serin


Closed Thread
Results 1 to 3 of 3

Thread: serin

  1. #1
    Join Date
    Aug 2005
    Posts
    95

    Smile serin

    Im trying to make a protocol converter using the serin an serout commands. The device sends instructions of varying length. That’s the problem. Ive used SERIN PortB.5,N9600,b0,b1,b2,b3 but some of the instructions only use b0,b1 so the serin command is still waiting for b2 and b3. Ive also tried adding the timeout instruction to the command to reset serin, this does work 90% of the time but it tends to miss out instructions during the time out.

    (b0,b1,b2,b3 are var bytes)

    Any ideas Sphere.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    If your PIC have an internal USART... use it. Use the USART interrupt to get your data, then send it where you want.

    No timeout hassle and all this kind of future problem. Do a search with USART Inerrupt and you should find more than enough to begin

    Receive your data, one byte at the time, then you can store them in an aray, EEPROM, send it to LCD.........
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Aug 2005
    Posts
    95

    Smile Serin

    Thanks for the reply I will give it a go.

    Sphere....

Similar Threads

  1. Serin EEPROM Programmer
    By dirtbiker5627 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 24th February 2010, 23:48
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  4. Serin with low voltage
    By f_lez in forum General
    Replies: 3
    Last Post: - 21st August 2006, 11:52
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

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