C3, A/D, Femtobasic problem(?)
sidecar-racer
Posts: 82
Working on same project, "C3 and SD card".
Decided to use the drivers with the two versions of FemtoBasic from Parallax website for C3.
1. David Betz
2. Mike Green
The first version would hang when an ADC call was made using fsrwfemto.spin.
The second version returned un-related numbers using isxspi.spin.
So, I loaded the associated FemtoBasic and got the same problems;
1. PRINT ADC[0,0] would hang C3
2. PRINT ADC[0,0] would return from -65 to -1536 erratically (never same value twice) and interaction between channels.
(Same numbers as isxspi.spin)
The C3 A/D demo runs just fine with values of 0 to 4095 as expected.
Am I dealing with a bug(s) in FemtoBasic drivers or perhaps a problem with my C3?
Decided to use the drivers with the two versions of FemtoBasic from Parallax website for C3.
1. David Betz
2. Mike Green
The first version would hang when an ADC call was made using fsrwfemto.spin.
The second version returned un-related numbers using isxspi.spin.
So, I loaded the associated FemtoBasic and got the same problems;
1. PRINT ADC[0,0] would hang C3
2. PRINT ADC[0,0] would return from -65 to -1536 erratically (never same value twice) and interaction between channels.
(Same numbers as isxspi.spin)
The C3 A/D demo runs just fine with values of 0 to 4095 as expected.
Am I dealing with a bug(s) in FemtoBasic drivers or perhaps a problem with my C3?
Comments
I hope to do a web presentation next year (we're located near Rocklin)
Rick & Nida Murray
I have written a datalogging program and verified its use with the SRAM and the ADC. However, I have never gotten the program to work with any of the recommended SD drivers: FemtoBasic, FSRW, SDFATEngine, LaMothe code, SD-MMC_FATEngine... you name it. I have spent many hours trying different drivers, configurations, timing schemes etc. I finally gave up be cause it just didn't seem worthwhile anymore.
It's frustrating because I had high hopes for the C3 as a versatile little tool but it has too many idiosyncracies for me to try to use it as a datalogger. Even though it has a tremendous SRAM buffer and huge SD capability.
If anyone works out the IO conflicts I would love to try out the code.
SM
Rick
Rick
I will have a crack at my data logger again with your latest routines. But what is the C3 FTP site? I was going to suggest that C3 specific software listed in the OBEX (if in fact there is any) have its own C3 folder.
Thanks for your dedication...
SM
Here are the objects I am referencing in my main program:
Is this correct to access the SD driver for the C3?
If it is do I simply open a file and begin writing with:
Because the C3 keeps locking up like it did when I tried the AD_INIT with any of the other SD drivers.
If anyone is still interested. I know this is a bit redundant but it is such a hurdle for me I thought I should publish!
I have used fsrw.spin for SD access (the C3 SPI version) along with LaMothe's simple routines for access to the ADC, SRAM, and Flash RAM .
It at least seems to be functioning as I can read the data files created on the SD with my Excel spreadsheet.
So, I now have a data log device (the C3) that I plan on streamlining for future use. One of my colleagues at work wants a low cost system to remotely record accelerometer measurements over an extended period of time and this is a good candidate. We may even incorporate an Xbee system for log file retrieval.
Merry Christmas,
SM