Go Down

Topic: Issues with SoftSerial, AltSoftSerial, I2C, Interrupts – anyone know anything ab (Read 257 times) previous topic - next topic

jboyton

You could record the incoming data in digital form, or at least a snapshot of it.

Without any soft serial loaded you could setup timer 1 to run at, say, 1us per step. Then start polling the RX line. Whenever RX changes, record the level (0 or 1) in a buffer and read timer 1 and store that in a parallel buffer. A byte has on average 5 or 6 transition. After filling the buffers you could print the data and see the sequence of transitions and the elapsed time between them. This would allow you to reconstruct the incoming data stream. It's a little tricky but it might reveal something.

Robin2

Hi Robin2... I was just using the Leonardo for testing. I need something much smaller for the actual device I'm building, which leaves me with limited options with what's available now with multiple UARTS:(
That does not provide enough information. How many serial connections do you need ?

 An Arduino Micro is a small-format Leonardo.

...R

CircuitSerialKiller

Robin2.. the end goal has been a pro mini for this project. I have a micro, but it's too big for the case it needs to fit in. The only other thing that would fit is a Microduino, but the cost each is 6x that a piece of the pro mini. I wish I could get the AltSoftSerial library working with the device I'm reading. It's going to be hard to find the time to troubleshoot that. So, I'm thinking of doing a few things:

1. Switch RX for the device over to the UART, then use AltSoftSerial to TX the data out and RX input commands from/to the terminal app, and see how that works. I'm having a problem with the one workstation I'm using detecting the Leonardo bootloader USB device, so I'll have to figure that out. This also means a bit more effort in development to upload sketches if I don't do the dev on the Leonardo since on the Nano I'd be sharing the serial pins between uploading sketches and reading device data.

2. Switch out the accelerometer to one that I can read on the SPI bus to avoid dealing with interrupts.

jboyton.. thanks for all the technical details regarding serial communications and interrupts with the Arduino. That's all really helpful. I triggered Google's robot detection CAPTCHA about 10 times just trying to look up information on it.

Runaway Pancake

I was just using the Leonardo for testing. I need something much smaller for the actual device I'm building, which leaves me with limited options with what's available now with multiple UARTS:(
This could be a job for "The Beetle" -- http://www.dfrobot.com/index.php?route=product/product&path=35_104&product_id=1075#.VavRRazn9dh
"You gotta fight - for your right - to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"
It's "bipolar transistor" or "junction transistor" - "BJT" is just stupid.
When all else fails, check your wiring!

Robin2

Robin2.. the end goal has been a pro mini for this project. I have a micro, but it's too big for the case it needs to fit in.
You have still not clearly described what needs to be done and what needs to be connected to what. If you tell us that someone might see a better solution. Focus on WHAT rather than HOW

...R

Go Up