Aggregator
Contents
Overview
The aggregator is an Atmel AVR processor that interacts with the SPU, GPS and xbee. It performs the following functions -
- It receives the NMEA messages from the GPS receiver and sends them(GPGGA and GPVTG messages) to the SPU in a 5 Hz loop
- It receives messages from the xbee receiver and sends them to the SPU
- It accepts messages from the SPU and sends them to the mother node
Hardware set-up
The aggregator board needs to be connected to a 4.5-6.0 V DC supply(through the special cable - a 16 pin IDC cable connected to the aggregator board with a DB9 connector to the SPU or your laptop and the power leads to your power supply.
- The schematic is in svn- http://svn.lee.org/swarm/trunk/pcb/aggregator/agg-schematicpdf.pdf
- The AVR to IDC to DB9 pin mappings here - http://svn.lee.org/swarm/trunk/pcb/aggregator/640pinlist.xls
- The fuses are -
- lfuse reads as ED
- hfuse reads as 99
- efuse reads as FF
- The jumpers should be set as
- X2 : off
- JP1 : 2-3
- JP2 : 2-3
- JP3 : 1-2
But you probably don't have to change it.
Build
The aggregator depot is located at svn-trunk/aggr/. The build directory is svn-trunk/aggr/build and the following parameters will have to be configured for uer's build platform.
SVN_TRUNK = c:/trunk
TARGET=main
The targets for the test cases are in the makefile as well e.g.
- blinky_test
- simple_uart_test
- uart_test
- swarm_queues_test
- spu_test
- xbee_test
- gps_test
The make targets to build are -
make clean
make all
Deploy
Assuming you are using a STK500 with a 6 pin ISP cable connecting the ISP header on the STK500 to the aggregator. Change this in the makefile to point to the port connected to the "RS232 CTRL" port on the STK500 -
AVRDUDE_PORT = COM7
The make target to upload is -
make upload