![]() |
Forum Index : Microcontroller and PC projects : MaxiMite COM1 flow-control question...
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9489 |
Hi there folks. ![]() If I enable flow-control(CTS and RTS) on COM1, and connect the pins, do I need to then process the flow-control, or does the MM do all this for me in the background? Reading the manual, page 47 states that: In my case, I am about to connect a pager transmitter, which has provision for CTS/RTS, and I am just curious that if I connect these lines, and enable FC on COM1, do I need to do any extra code or will the MM and the pager transmitter work it out between them? Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9489 |
Now that I have sorted my main serial problem from the other thread, with the help of members here, I give this thread a gentle BUMP! ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
MicroBlocks![]() Guru ![]() Joined: 12/05/2012 Location: ThailandPosts: 2209 |
It is done by the hardware (whith bitbang serial it is done on the firmware level), no extra programming required. Microblocks. Build with logic. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9489 |
Cool, thanks. Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9489 |
I'm just playing with this idea tonight. According to diagrams freely available on Google Images, CTS and RTS are transposed at each end of the link - just like TXD goes to RXD kind of thing. Now assuming I have all that correct, how does the MM actually deal with flow-control at the MMBasic level? What I mean by that, is that if I have several messages to send to the pager transmitter(in my case), and I just print these messages to the com port handler, would I be correct in assuming that this data will just stack up in the serial output buffer, and at which point, the MM and the transmitter will deal with data exchange all by themselves, even if there is more then on message waiting to be sent? IE: Imagine that I send a message to the transmitter, but it is busy already transmitting something else. With CTS/RTS in use, the TX can signal the MM that it is busy, so to speak, and the MM will hang around till the TX indicates it is ready more more data, at which point, the MM sends it. Do I have the concept correct? Does the MMBasic code stop while the flow-control is going on, or does this happen all in the background, and the main code keeps running? My main concern, is that if the TX is busy transmitting at the time you send it another message, the new message will be dropped. In theory, that WON'T happen, if I connect and use flow-control correctly - yes? Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6220 |
It would depend a lot on the transmitter. It might be able to store a number of messages in a buffer or it might use the CTS line to indicate that the message has been sent and it is ready for the next message. On the Maximite end, provided you don't overflow the tx buffer, no data will get lost. It should be easy to do a test to see the hardware flow control in action to build up your confidence. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9489 |
Yes, you are right. I will build a test rig, using a MM, and when I run the test code, I can send two or three messages with about 1 second between messages, so that by the time the 2nd one is being sent to the TX, the 1st one should be in the process of being sent, and this will allow me to see what happens. So long as I am on the right track, and solid ground with the theory. Smoke makes things work. When the smoke gets out, it stops! |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |