USART problems


Closed Thread
Results 1 to 40 of 48

Thread: USART problems

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Cool

    I think I figured it out.

    I lowered the BAUD rate down until I got to 2400 and things seem ok at first glance. Since the PC didn't want to wait or wasn't receiving the CTS flag fast enough, I guessed that lowering the transfer speed would give it more time to react.

    I have to go line by line to make sure no garbage crept through isolated areas, but the records line up and look good.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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


    Did you find this post helpful? Yes | No

    Default

    to use CTS, you must ensure your terminal software handle it. If you're using MicroCode studio... it does'nt. Only RealTerm, or others with proper FlowControl setting CTS/RTS or DSR/DTR will stop when you clear CTS... in the worst case... $#%#$!#%$##*#$* hyperterm can stop too... if you're able to make it work... $%$### hyperterm ...

    BTW, at this poit, it looks like any of those terminal program i use, handle poor the flow control. I can stop, receive echo back a character of 4Mb files without any delay between receive, but if i place 5-10 or else uSec or mSec delay between each CTS i'm screw up. it's skip character, or i get garbage...

    still looks like the program stop serial out in the middle of a character or else.

    i figure i'll have to make my own software... again. we can't never trust somebody on this earth... still a pain to have a 100% workable program... Terminal 2.xyz is a big piece of &^&^%@@$%... sorry for the person who refer this program...

    As Bruce said, 2 way comm is the way... i agree. Probably better than CTS/RTS bulls.h.i.t... wich is probably just good enough to start transfer and stop at the end... or
    1. i'm missing something trivial on that.
    2. my terminal program is not good enough.. but for sure better than Hyperterm
    Last edited by mister_e; - 6th March 2005 at 11:08.
    Steve

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

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Cool

    Yup,


    I couldn't get RealTerm to work properly either, I get garbage chatacters echoed back, and nothing goes to the PIC. HypeTerminal (R intentionally left out) is worse, I don't get any feedback at all.

    I've been using the serial window from Studio Plus and it looks like the best solution for me. I copy my datafile from NotePad, paste in the SEND window, CLICK, and away it goes. I lose out on some of the echo at the bottom of the file, but I don't really care. I also display on the LCD and the last records seem to be there.

    So now I'm going to write a program to read back from EEPROM. It's a link list database, so I have to write the code to follow through all the pointers and display the data back on the PC; using HSEROUT should not be a problem at this point.

    It's not a perfect solution, 2400 BAUD ain't something to brag about, but it seems to work. Since this download will not be used often, that suits me fine. As long as it works reliably, I'm happy.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Take a look at the source code for one of the free boot-loader programs out there. You'll see how the PIC firmware & PC loader software work together (with two-way communications) to transfer large files from PC to PIC.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default

    yup, that's for sure Bruce, this is why i plan to do my own terminal program for some 'specific' purpose.

    Send a packet to PIC, PIC send 'ok' (or whatever else), once PC receive it, send next packet, and so on. That imply to build our own program instead of using CTS/RTS DTR/DSR with already made terminal program. AND we save i/o for handshaking.
    Steve

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

Similar Threads

  1. My USART problems..
    By Glenn in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 31st July 2009, 02:00
  2. problem with USART
    By leemin in forum Serial
    Replies: 4
    Last Post: - 11th December 2006, 18:56
  3. USART TXREG Problems
    By BigH in forum Serial
    Replies: 2
    Last Post: - 11th January 2006, 01:30
  4. Replies: 5
    Last Post: - 1st December 2004, 13:49
  5. Synchronous USART problems... HELP!!!
    By moni in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th November 2003, 20:00

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