View Full Version : isoPodX Software uart buffers
kneedown
04-27-10, 07:32 AM
I am using an IsoPodX and intend to feed the data from a GPS receiver to the pod via software UART. Some time ago there was discussion on the forum about implementation of buffers for software UART. Can this now be done and, if so, is there any documentation on how to do it?
Regards,
Mike
RMDumse
04-27-10, 08:57 AM
Yes. That discussion was here http://www.newmicros.com/discussion/showthread.php?t=1026&highlight=soft+UART
Documentation and notes on Beta development:
Serial I/O for Soft UART pins now may use (byte-packed) buffers.
Words affected for pins PE2-PE7:
TXBUFFER ( a n -- ) specifies a buffer for a transmit pin;
n=0 will return to unbuffered operation.
RXBUFFER ( a n -- ) specifies a buffer for a receive pin;
n=0 will return to unbuffered operation.
TX ( c -- ) No change in operation.
RX ( -- c ) No change in operation.
TX? ( -- n ) When buffered: returns the number of characters
the tx buffer can accept, or 0 if tx buffer full. When
unbuffered: returns 1 if tx register empty, 0 if not.
(Formerly returned -1 if tx register empty.)
RX? ( -- n ) When buffered; returns the number of characters
waiting in the rx buffer, or 0 if rx buffer empty. When
unbuffered: returns $02cc if a valid character was received,
$03cc if a framing error, zero if no character received.
(Formerly returned $80cc/$81cc for valid char/framing error.)
Note that TXBUFFER and RXBUFFER automatically do IS-TX and IS-RX, respectively. If you use TXBUFFER/RXBUFFER you don't need to use IS-TX/IS-RX. NOTE that IS-TX and IS-RX reset the pin to "unbuffered"
status. Do not specify IS-TX/IS-RX *after* TXBUFFER/RXBUFFER. It is ok (but unnecessary) to use IS-TX/IS-RX *before* TXBUFFER/RXBUFFER.
Also, buffers for the Soft UART pins may *not* be in the address range FC00-FFFF. This is not a problem with most IsoPods, but should be noted for IsoPods with external RAM. (This limitation does not apply to the SCI0 and SCI1 ports, or the SPI port.)
Beta Versions 0.92 changes the soft UART feature to use pins PA4-PA7 and PE4-PE7.
Changed soft UART to use PA4-PA7 and PE4-PE7 pins.
There was a problem with PE4 (and PA4). There was a bit error in the interrupt testing logic, which was causing that pin never to be serviced...and thus stuck in an infinite interrupt loop. It's fixed in the attached v0.94.
kneedown
04-27-10, 09:20 AM
Thanks for your fast response. It looks like the functionality that I'm looking for is only in Beta versions of Isomax. I guess I'm using v.86 that was built in to my IsoPodX when purchased (about 2 years ago). Is there a mechanism for me to obtain the latest (beta?) version?
kneedown
04-29-10, 06:30 AM
It seems that the functionality of buffering the software UART exists only in beta versions of IsoMax? If this is the case, is there some way of users acquiring a beta version in order to use the enhancements? My IsoPodX uses V0.82.
Regards,
Mike
RMDumse
04-29-10, 04:24 PM
Sure, all we ask for the beta's is feedback if you find something, and that you understand the beta's are beta's, that they may have introduced minor bugs in our attempt to expand or improve code.
We can load the beta for you if you return the 'Pod, or if you have a JTAG cable and have signed the license form, we can send you an S-record you can load yourself.
I'm on the road, but BC is in the shop and can help you either way if you want to have a beta loaded.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.