PDA

View Full Version : ZIC2410 EVB3's Communication


magnetron
05-01-2010, 04:21 PM
I read the all topics in this forum and all user manuals on this portal and still doesn't understand how can I send data from one ZIC2410 EVB3 to another.
For example, I want to read the data from ADC pin of first ZIC2410 EVB3 (connected to PORTAL) and transmit it to UART1 of second ZIC2410 EVB3.
How can I do this?

Another question.
How can I read ADC channel faster that 1ms (HOOK_1MS).
In SNAP Reference Manual.pdf (p. 28) wrote:
"Maximum rate for readAdc() calls: maximum 5000 samples/second"
How can I reach this rate? (HOOK_ADC maybe?)

kbanks
05-03-2010, 02:19 PM
I read the all topics in this forum and all user manuals on this portal and still doesn't understand how can I send data from one ZIC2410 EVB3 to another. For example, I want to read the data from ADC pin of first ZIC2410 EVB3 (connected to PORTAL) and transmit it to UART1 of second ZIC2410 EVB3. How can I do this?

I think the source of your confusion is that you are trying to find a way to do everything in one single step. As is often the case in programming, you have to break things down into manageable chunks. Taking your example:

1) How do I read an ADC? By using the readAdc() call in your script.

2) How do I send information from one node to another? Usually by making an RPC call from one node to another. The actual data (an ADC reading for example) would be a parameter in the RPC call.

3) How do I report information out the serial port? By crossConnect()'ing the desired UART to DS_STDIO, and using print statements from your script.

Everything you need to know to be able to do this is covered in the docs, and I think if you looked in the SNAPpy script exchange you could find relevant examples.

Take another shot at it.

Another question.
How can I read ADC channel faster that 1ms (HOOK_1MS).
In SNAP Reference Manual.pdf (p. 28) wrote:
"Maximum rate for readAdc() calls: maximum 5000 samples/second"
How can I reach this rate? (HOOK_ADC maybe?)

To take multiple fast readings, just call readAdc() multiple times in a row.


val1 = readAdc(0)
val2 = readAdc(0)
val3 = readAdc(0)


Note that you are only going to be able to store a limited number of readings obtained this way.

No, there is no such thing as a HOOK_ADC.