Another Serin/Serout Problem!


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    I wonder, why don't you use the UART that the F688 has?

    Things are going to be much faster and reliable.

    Now for the crap characters that remain in the string when you end it with less characters than 16.

    An idea would be to have a FOR/NEXT loop and check where is the CR and fill the rest of the array with space character.

    Have not tested but will give you a start:

    for i=0 to 15
    if testSTR[i]=13 then exit_for
    next i

    goto rest of the program

    exit_for:
    for j=i to 15
    testSTR[i]=" "
    next j

    Ioannis
    Last edited by Ioannis; - 7th June 2007 at 07:13.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    UART huh? ive seen it around in the forums but never actually sat there and read what it was. i'll have to look into it and see how it works so that i can implement it on the lcd driver. so far it has been working great the way that i set it up with the serout2. its not as fast as uart probably but right now i just wanted something that could read an 8 pin chip so i can trouble shoot it.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jmbanales21485 View Post
    UART huh? ive seen it around in the forums but never actually sat there and read what it was. i'll have to look into it and see how it works so that i can implement it on the lcd driver. so far it has been working great the way that i set it up with the serout2. its not as fast as uart probably but right now i just wanted something that could read an 8 pin chip so i can trouble shoot it.
    UART = Universal Asychronous Receiver Transmitter - the basis for all serial ports.
    You're using SERIN and SEROUT. Those are softwart 'bit-banged' versions.
    The UART is the all-in-one, hardware, version of what the SERIN/SEROUT commands do. It can work in the background, rather than tying up your program waiting for the next character to come along. The UART will catch a character and hold it (within reason) until your program goes out and gets it. With SERIN, you have to 'sit' in that command (within reason again) until the next character comes along.

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