|
|
| Author |
Message |
zbasicandy
Joined: 26 Jan 2006
Posts: 193
|
|
Posted: 24 April 2006, 22:15 PM Post subject: Comm errors on sustained communications. |
|
|
Being able to communicate for short periods is a very good start!
If you have tried everything Don has suggested and it still doesn't work and your are about to give up maybe try this when all else has failed.
Goto www.hth.com/snap/
Get the snap doc's and rewrite your drivers with snap which would give you
up to 8 different error detection methods. You can also apply error correction - see doc's.
S.N.A.P is an free and open network protocol. The protocol was primary developed for PLM-24 based
home automation and control systems but it is a generic protocol and not limited to this. S.N.A.P can be used in any type of applications where an easy to learn and light weighted network protocol is needed.
Features.
- Easy to learn, use and implement.
- Free and open network protocol.
- Free development tools available.
- Scaleable binary protocol with small overhead.
- Requires minimal MCU resources to implement.
- Up to 16.7 million node addresses.
- Up to 24 protocol specific flags.
- Optional ACK/NAK request.
- Optional command mode.
- 8 different error detecting methods (Checksum, CRC, FEC etc.).
- Can be used in master/slave and/or peer-to-peer.
- Supports broadcast messages.
- Media independent (power line, RF, TP, IR etc.).
- Works with simplex, half-, full- duplex links.
- Header is scaleable from 3-12 bytes.
- User specified number of preamble bytes (0-n).
- Works with synchronous and asynchronous communication.
- Works with our free PLM-24 < > TCP/IP Gateway software.
Good luck! |
|
| Back to top |
|
 |
JC
Joined: 20 Feb 2006
Posts: 56
Location: Hudson,OH
|
|
Posted: 24 April 2006, 22:27 PM Post subject: |
|
|
Thank you for the reference. I'll check it out, but I hope not to need to pursue it... Intermmitent problems are the most frustrating!
JC |
|
| Back to top |
|
 |
JC
Joined: 20 Feb 2006
Posts: 56
Location: Hudson,OH
|
|
Posted: 26 April 2006, 4:45 AM Post subject: |
|
|
Don,
Sustained serial comm between two ZX-24's works flawlessly.
After 650 K bytes, without error, on the first try, I stopped counting.
Why the hybrid system, (ZX-24 / Nemesis PICF88), is erratic is yet to be determined. More troubleshooting is yet to be undertaken...
I suspect this ceases to be a ZX-24 / ZBasic concern at this time.
I appreciate everybody's help.
JC |
|
| Back to top |
|
 |
JC
Joined: 20 Feb 2006
Posts: 56
Location: Hudson,OH
|
|
Posted: 26 April 2006, 17:34 PM Post subject: Resolution |
|
|
For anybody following this thread, the cause for the erratic sustained serial comm in this hybrid, (ZX-24 to Nemesis PIC), was identified. (Finally !)
Nemesis firmware includes a 24 hour clock. This feature is only executed if an instruction is included to activate it. It uses a timer, and runs in the background, invisible to the user, who merely queries some time/date functions.
Without it, ZX-24 to Nemesis serial comm works flawlessly, 100 k's of bytes without error, as expected.
With it, sustained serial comm is erratic, and intermittently crashes.
I suspect the clock is occasionally doing some register roll overs, (Sec to Min, Min to Hrs, etc), that at some point prolong the interrupt service routine to the point where the software USART timing exceeds tolerable limits, leading to the errors. They occur at random, based on when the program was started, and what the clock time is...
The feature was used to time out some LEDs, triggered within the program, which is now done differently.
Thanks to Don and everyone for their interest and help.
JC |
|
| Back to top |
|
 |
stevech
Joined: 23 Feb 2006
Posts: 688
|
|
Posted: 26 April 2006, 18:53 PM Post subject: |
|
|
| pardon my ignorance: what is Nemesis? |
|
| Back to top |
|
 |
JC
Joined: 20 Feb 2006
Posts: 56
Location: Hudson,OH
|
|
Posted: 26 April 2006, 19:37 PM Post subject: |
|
|
The "Nemesis" is a Microchip PIC16F88 pre-configured to program in "Athena", a PIC version of Basic. It, and a series of similar processors, are available from Kronos Robotics. www.kronosrobotics.com
It is basically an inexpensive, pumped up Basic Stamp II.
The IDE and language are FREE.
The firmware includes an 80 byte, interrupt driven USART, which makes it tremendously better than the Basic Stamp for many projects that require serial I/O. It also includes high level commands to run a parallel interfaced LCD, as well as the usual timer, AtoD, bit level math, I2C, X-10, 1-wire comm, (limited) in-line assembler, PWM, and other capabilities, etc.
It does not have multi-tasking, or the ability to run multiple, background driven, serial comm channels, as does the ZX-24. I was using it as an inexpensive co-processor on a project, tied to a ZX-24.
May's Circuit Cellar includes an article connecting a Nemesis to a Bluetooth module, which connects to a BT GPS. The Nemeis runs the BT module, parses the GPS data, and displays it on an LCD. I often use the "Athena" chip, the Nemesis's little brother, as an LCD driver, ever since the Pic-An-LCD chip disappeared. Nuts & Volts may be running an article on using them as character mode LCD drivers later this Summer.
In short, it is an alternative to the Basic Stamp series, but does not compete with the capabilities of the ZX-24.
Lastly, I tinker with all of the above, and am not tied to any of the parent companies, Elba, Kronos, or Parallax.
JC |
|
| Back to top |
|
 |
stevech
Joined: 23 Feb 2006
Posts: 688
|
|
Posted: 26 April 2006, 23:32 PM Post subject: |
|
|
ah so. I had a stint with PICs way back. Paged memory architecture was really unappealing.
So Nemesis must have a poorly coded real time clock ISR that fouls up the interrupt latency on occasion. |
|
| Back to top |
|
 |
JC
Joined: 20 Feb 2006
Posts: 56
Location: Hudson,OH
|
|
Posted: 27 April 2006, 2:00 AM Post subject: |
|
|
You summed it up more more succintly than I...
It was a tough one to track down, but nice to finally do so.
JC |
|
| Back to top |
|
 |
zbasicandy
Joined: 26 Jan 2006
Posts: 193
|
|
Posted: 30 April 2006, 1:22 AM Post subject: Com problem |
|
|
Moral to live by ...
"Never hook up inferior/defective PIC IC's to quality microcontrollers
e.g. ZBasic's ZX-xx" |
|
| Back to top |
|
 |
|