ATMega1284P internal functions + digitalWrite


i using atmega1284p on custom bobuino board, rf24l01 radio module.

the module uses spi , have chosen connect csn chip select pin bobuino pin 29, connects atmega1284p port c pin 7.

this port named "pcint23/tosc2_pc7" , corresponds 1284 pin 29.

i need use pin control on/off slave select of rf module, have declared:

pinmode(29,output);

and use digitalwrite set high or low. in setup function of sketch set pinmode , set low active.

my loop function this:

void loop(void)
{
  radioreceive();
  radiosend();
  delay(5000);
}

where receive , send functions radio communication. program loops once fine , chip select goes automatically high , turns off module. tried using digitalwrite set cs pin low , see in beginning of loop (second time , every time after second) , after running each radio function uc tries set pin high , fraction of second goes high , it's set low because give digitalwrite low command.

i can't seem understand if cs pin set high default (if happens in sketches) or if has 1284p internal pin being used other internal function.

are using pre written library n2401? have looked @ how
handles cs pin?


Arduino Forum > Using Arduino > Microcontrollers > ATMega1284P internal functions + digitalWrite


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62