Below are recent performance measurements for the ATMEL ATmega128RFA1. These results may help you gauge whether or not SNAPpy can address your application’s timing requirements.
- Time to awaken from sleep (mode 0):
< 850 microseconds
- Time to startup from power-on:
< 250 milliseconds
- Maximum rate a SNAPpy script can toggle an IO pin:
In other words, each True/False cycle took 106.18 µs.
(To change the state of a pin takes 53.12 µs, and each pulse requires two state changes).
Keep in mind that as a general rule, SNAPpy scripts should not be looping; the above rate is only attainable if the node is doing nothing else (for example, no radio or serial port communication).
- Maximum rate for
maximum 19952 samples/second
In other words, each sample took 50.12 µs to gather.
This measurement was taken using a script that did not actually do anything with the data. You will also have to take into consideration any numeric processing required (data thresholding, etc.), as well as the need to actually store or transmit the data someplace.
Also note that the very first
readAdc()call takes 174 microseconds (not 50.12 microseconds) because of some initial “first-time-only” hardware initialization that is required. If your timing requirements are tight, you may want to make a “setup”
readAdc()call in your script’s startup event handler.
- Maximum rate for
- I2C Byte Transfer Time
The actual I2C transfers are done using “bit banging” in software. This was measured using a logic analyzer at 239 µs per byte.
- SPI Byte Transfer Time
The actual SPI transfers are done using “bit banging” in software. This was measured using a logic analyzer at 177 µs per byte.
- Virtual Machine Speed
The slight reduction in virtual machine speed is due to additional overhead to accommodate new features and options:
SNAP Version Instructions Per Second (IPS) Before SNAP 2.6 37500 Since SNAP 2.6 36000