I already have 220 Ohm pull up resistors and 10k Ohm pull down
resistors on all three of the pins. Should I try a higher value for
the pull up? I'll try different resistors and different pins to see if
I can get any results. Although I already tried making the pins go
high and low with the IO command and they worked fine.
SPI byref calls
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: SPI byref calls
220 ohm is too small of a pullup. The IOs are rated at 4mA. 4mA
times 220 ohms is about 1V, so its probably not pulling that line much
below 2V
1K would be a better value
Not much reason to have a 10K pulldown as well, I'd remove those, its
just contributing to global warming
times 220 ohms is about 1V, so its probably not pulling that line much
below 2V
1K would be a better value
Not much reason to have a 10K pulldown as well, I'd remove those, its
just contributing to global warming
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: SPI byref calls
I had a little bit of luck this morning. I took out the pull downs and
changed the pull ups to 1k and now I'm seeing a clock and data being
sent out. The problem is that the signals are only 10mv which I don't
think is high enough for the ARM to read. Looks like I need to do a
bit more tuning.
changed the pull ups to 1k and now I'm seeing a clock and data being
sent out. The problem is that the signals are only 10mv which I don't
think is high enough for the ARM to read. Looks like I need to do a
bit more tuning.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: SPI byref calls
I think this just might have been a pin issue. I switched the pins to;
SPIIN(1, 0, 3, -1, 0, 0, "", 50, INlist)
and now I'm getting a well formed 3.3v clock and the CS pin is going
high then low like its suppose to. Except now my ADC isn't outputting
anything. This is very frustrating.
SPIIN(1, 0, 3, -1, 0, 0, "", 50, INlist)
and now I'm getting a well formed 3.3v clock and the CS pin is going
high then low like its suppose to. Except now my ADC isn't outputting
anything. This is very frustrating.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: SPI byref calls
SUCCESS!!!!!! Had a bit of a grounding issue with the AD but I got it
working. Well sort of anyway, I still need to figure out the exact
protocol. Here's the code I used to get just to get an error message
form the AD for future people that might need help.
------------------------------------------------------------------------
'Program to capture data from an external A/D converter
#include <SPI.bas>
DIM INlist(5) As String
const CLKpin = 3 'SPI clock(connects to uM-FPU SCLK/SCL pin)
const Outpin = -1 'SPI data out (connects to uM-FPU SIN/SDA pin)
const INpin = 0 'SPI data in (connects to uM-FPU SOUT pin)
const CSpin = 1 'SPI CS (connects to uM-FPU CS pin)
SPIIN(1, 0, 3, -1, 0, 0, "", 5, INlist)
print INlist(0)
print INlist(1)
print INlist(2)
print INlist(3)
print INlist(4)
print INlist(5)
----------------------------------------------------------------------
working. Well sort of anyway, I still need to figure out the exact
protocol. Here's the code I used to get just to get an error message
form the AD for future people that might need help.
------------------------------------------------------------------------
'Program to capture data from an external A/D converter
#include <SPI.bas>
DIM INlist(5) As String
const CLKpin = 3 'SPI clock(connects to uM-FPU SCLK/SCL pin)
const Outpin = -1 'SPI data out (connects to uM-FPU SIN/SDA pin)
const INpin = 0 'SPI data in (connects to uM-FPU SOUT pin)
const CSpin = 1 'SPI CS (connects to uM-FPU CS pin)
SPIIN(1, 0, 3, -1, 0, 0, "", 5, INlist)
print INlist(0)
print INlist(1)
print INlist(2)
print INlist(3)
print INlist(4)
print INlist(5)
----------------------------------------------------------------------