Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Direct Bit-Banged Serial I/O

 
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode
Author Message
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 04 May 2009, 22:54 PM    Post subject: Direct Bit-Banged Serial I/O Reply with quote

A customer needed a way to perform serial I/O to multiple devices at fairly high speed; higher than the 19.2K supported by the ZBasic software UARTs (Com3-Com6). They suggested that something similar to the SERIN and SEROUT commands of PBasic would meet their requirements quite nicely. In response, I put together some code (for native mode only) that performs direct (non-buffered) serial I/O that has been tested as high as 115.2K baud. It should be able to go even higher, perhaps as high as 460.8K baud.

You can find the code attached. Some discussion of the advantages/disadvantages and a simple test driver can be found in the source code.



SoftSerial.zip
 Description:
Direct serial I/O.

Download
 Filename:  SoftSerial.zip
 Filesize:  3.44 KB
 Downloaded:  3002 Time(s)

Back to top
spamiam



Joined: 13 Nov 2005
Posts: 666

Posted: 05 May 2009, 18:14 PM    Post subject: Reply with quote

Don,

When I tried to D/L the zip file, I got an error saying that the zip file was invalid or corrupt!
-Tony
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 05 May 2009, 18:19 PM    Post subject: Reply with quote

spamiam wrote:
When I tried to D/L the zip file, I got an error saying that the zip file was invalid or corrupt!
I just tried it and it seemed fine, both when opening it directly and when saving it first and then opening.

I can send it to you by email if you'd like.
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 05 May 2009, 18:39 PM    Post subject: Reply with quote

spamiam wrote:
When I tried to D/L the zip file, I got an error saying that the zip file was invalid or corrupt!
Worked for me.
Back to top
dlh



Joined: 15 Dec 2006
Posts: 266
Location: ~Cincinnati

Posted: 02 June 2009, 0:09 AM    Post subject: Reply with quote

Any chance of a version that could be used for downloading?

I have a handful of applications where the ZX-328n would be ideal but the need to invert the hardware UART adds cost and takes up too much PCB real estate.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 02 June 2009, 0:46 AM    Post subject: Reply with quote

dlh wrote:
Any chance of a version that could be used for downloading?
Unlikely. The downloading code is in the "bootloader" portion of the device that is programmed during manufacturing. Although it might be possible, conceptually, to include bit-banged serial in the bootloader, there isn't enough space left in the bootloader section of Flash to include it.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Native Mode Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group