getting somewhere
Hi, iv now built the circuit and im ploughing through the code.
currently iv got the square wave output on the ds1307 flashing at 1Hz, and the two leds are off usually but when the logging switch is connected high the leds flash alternatly, also with the switch on when the memory card is in the alternating flashes seems to stay on the green led longer.
I still cant get the system to initialise a file on the uAlfat, im currently using the same (unaltered) code from post 8. with no other inputs connected (just the connections required in the circuit and the logging switch).
am i right in thinking that the LEDS are connected to output 1 and 2, the reason i ask this is the comment regarding pwm it is output 1 and 2 and not pwm1 and 2?, i assume iv got this right at the moment as the leds are giving outputs.
uALFAT:
readoutputs b0 'see if Led turned On (output low as sinks from pwm)
If uAStartLog = 1 Then 'Want to turn logging on / off
If bit2 = 0 then 'On so turn off
High 1 'record error Red LED Off Supply from pwm - sink to port
High 2 'recording Green LED Off Supply from pwm - sink to port
else 'Off so turn on
High 1 'record error Red LED Off Supply from pwm - sink to port
Low 2 'recording Green LED On Supply from pwm - sink to port
pause 1000
gosub uA_InitFilesys
EndIf
EndIf
If bit2 = 0 then 'File Initialised, start logging
gosub uA_StartLog
Endif
Also what is bit2?
many thanks.
EDIT,
after hours of looking for problems iv finnaly found it in an unexpected place. The two memory cards i had been testing with were a new 2GB card and a 4GB HC card, the device doesnt seem to like the hc card and the 2gb card appears to have been faulty, iv put another standard micro sd card in and it is initialising a file.
Many thanks for the support guys but it would still be useful to know what bit2 is incase i need it later.
Thanks for the support, as a thankyou once iv got the circuit finalised (and tested) ill upload a pcb design that im doing for my project in the hope that it will help others, like everyone has helped me.