Another Serin/Serout Problem!


Results 1 to 8 of 8

Threaded View

  1. #1

    Default Another Serin/Serout Problem!

    Hello All!

    i, like many others, have a serin/serout problem, and after much research i have manged to get through 80% of it.

    So i am planing on using my 16f688 PIC as an LCD driver and be able to communicate any other PIC to it via serial communication. (so i won't have to connect 6 cables to the pic anytime i want to use the LCD). I am using a 16 char by 2 line LCD

    So far I have the serial communication working and am able to talk to the LCDDriverPic from any other PIC. The problem is how to determine the amount of characters i recieve from the pic.

    for example on the transmitter side i have:
    serout SerialOut, mode, ["LCD", $FE, 1, "transmit", CR]
    i am transmitting at 2400 baud, sends "LCD" to initialize LCDDriver, and then sends the LCD commands, which in this case is $FE, 1, "transmit"

    on the reciever i have :
    serin2 SerialIn, mode, [WAIT("LCD"), testHEX, testHEX2, STR testSTR\16\CR]
    I am receiving at 2400 baud, it will wait for "LCD" and receive the data. the string testSTR will receive 16 characters.

    when i do this my LCD will display "transmit" (GOOD!!!) BUT will fill the remaining 8 slots with random characters (BAD).

    so i need to know if there is a way of determining the last leter of a string sent or something that gives me an indication that its done transmitting so the receiving side won't fill the remaining characters with random. attached is a sample code that i have and works (except for the random characters issue)

    thank you all in advanced!
    Attached Files Attached Files

Similar Threads

  1. Strange problem with Serin/Serout on 16F628
    By Atom058 in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 22nd August 2008, 00:16
  2. Problem to compile my program
    By wagner in forum Off Topic
    Replies: 5
    Last Post: - 7th July 2008, 20:17
  3. 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, 08:12
  4. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 21:39
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

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