propeller c3 spi problem
ggg558877
Posts: 40
Hi everyone
I have some problem about c3 spi
now i want to use c3 spi A/D to get the data and write into SD card
if I separately use them it ok
but when i use together the A/D value always 0
how can i use A/D and SD card together?
thanks
I have some problem about c3 spi
now i want to use c3 spi A/D to get the data and write into SD card
if I separately use them it ok
but when i use together the A/D value always 0
how can i use A/D and SD card together?
thanks
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 con RX1 = 31 ' programming / terminal TX1 = 30 SDA = 29 ' eeprom / i2c SCL = 28 SD_CS = 25 SD_DI = 9 SD_CLK = 11 SD_DO = 10 OBJ pp : "po" sdcard : "dave_fsrw" term : "FullDuplexSerial" num : "numbers" var long g_temp1 PUB demo | check ,value term.start(31, 30, 0, 115200) pp.SPI_Init check := \sdcard.mount_explicit(SD_DO, SD_CLK, SD_DI, SD_CS) check := \sdcard.popen(string("NMEA.txt"), "w") 'value:=10 repeat 10 AD_Test term.dec(g_temp1) 'wind direction term.tx(13) sdwrite WaitCnt(ClkFreq+ Cnt) sdcard.pclose \sdcard.unmount PUB AD_Test pp.AD_Init g_temp1 := pp.AD_Read( 0 ) PUB sdwrite sdcard.pputs(num.ToStr(g_temp1,10))
Comments
so i can't get the A/D value then write into SD card?
I have try to use fsrwFemto and sdspiFemto but it dosen't work
I don't know how to solve my problem
are there someone had used propeller c3 both A/D and SD card?
from time to time the SD-Card-driver is started to write the data and then stopped again? Would that work?
Surely the C3 has everything "on board" but how about connecting an external SD-Card-socket to some pins to keep the SD-card
away from the SPI-bus?
best regards
Stefan
Hi StefanL38
I try to completely stopped and started the driver but in the sd card only show one value
because if i re-start the SD-Card-driver the value before will clear
Make sure you close the file before stopping the SD card driver.