Hi all, ~first time poster long time listener, and still a massive AVR noob.
I am trying to set up a network of CC2420 zigbee modules controlled by an atmega128 which will be acting as a sensor network. The hardware is prebuilt and supplied to me by my uni.
CSn -> PB0
SCLK -> PB1
SI -> PB2
SO -> PB3
VREGn ->PB5
RESETn -> PB6
FIFOP -> PD0
FIFO -> PD1
SFD -> PD4
CCA -> PD6
My problem is really a 'where to start' type problem. I personally learn best from studying existing codes, to see how each function or register is correctly used, and despite my extended google search abilities, and forum search abilities, I am unable to find anything helpful.
I've figure I should set the SPI registers (as well as ports to appropriate inputs/outputs)
SPCR = 0x53;
SPSR = 0x00;
and then I send data;
SPDR = dataSend
If someone could please point me in the right direction, I would like to start by making a simple point to point network that lets me switch on/off LEDs on one device, using the push buttons on another. I am moderately competent in led switching/interupts/timers etc already (thanks to this website), its the transmission side of things that is letting me down. I believe it has alot to do with misunderstanding how the CC2420 utilizes the SPI interaface.
Any help would be appreciated. I feel a simple push in the right direction could really get the ball rolling.
attached is a board shematic for anyone interested