Getting SD-MMC_FATEngine to work with ADC and SRAM on C3
StephenMoore
Posts: 188
My spin code bombs when I try to write data from the SRAM to the SD on my C3. The SD driver authors say the SPI select code was inserted afterwards. Has anyone verified use with LaMothes demo routines?
Comments
It should be able to coexist with other SPI routines as long as they select the desired device on each usage
It's me again. If you read this I am still having trouble with integrating SD drivers and the C3 SPI select feature. If I use SPI_Init then the SPI driver in the SD asm code bombs and I can not mount the card. If I do not use SPI_Init then I can not access the AD chip using SPI_Select. Somehow the pin I/O state is being redefined by one or the other drivers and they do not play well together. I am trying to write a very lean custom application and am getting frustrated. Thank you for the femtoBASIC code too.
SM
Hello again.
I have had some success with femtoBasic drivers... my C3 doesn't lock up when I access the ADC with a mounted SD!
However, I am getting garbage out of the MCP3202. Applying sglDiff = TRUE and oddSign = TRUE (single ended Channel 1) gives wild numbers coming back. The conversions are normal with La Mothe's ADC demo. I have an LM34 thermometer attached so it is a pretty simple setup.
The MCP3202 datasheet shows the converted 12 bit data ( plus one leading null bit ) coming back as soon as the the last bit of the 4-bit command is received. Any ideas regarding timing in the Winbond_Driver asm?
Regards,
SM