SX issues with SHIFTIN?
I am stumped.
I have an SX28 controller, and a TLC0832 2-Channel ADC.
I have used this chip with the BS2 without any problems, but when I try my interface with the SX, I am getting a lot of noise on the output.· The Voltage going into the ADC is a steady 3.3 with a reference of 0V and 5V.
Here is the portion of code that is killing me right now...
·'READ ADC #1
·PULSOUT RA.0,5
·SHIFTOUT RA.1, RA.2,MSBFIRST,%110\3
LOW RA.1
·PAUSE 1
·SHIFTIN RA.3, RA.2,MSBFIRST,VENDOR_VARIABLE
·LOW RA.3
The ADC requires a shiftout command to get the data (%110).· This is good and clean (see attached photo 1)
The Shiftout is going to the ADC DataIn, and is accepted cleanly.
The low is just to make sure the Data Pin is pulled low.
Now things get messy.· When I run a Shiftin,·I seem to be often times losing the last bit transmitted to the SX.
Attachment 2 is what I expect to recieve.
Attachment 3 is what I am also recieving. (note the last bit is 'cleaved' off)
Unfortunately, this is the MSB, so it is Huge Jumps, and I can't figure out why I am getting 'mixed signals'...The voltage to the chip is not changing, the chip works fine with a BS2...I think I just need some help!!!
Shaun
·(no...this isn't intended to be a Parallax Oscope ad...but I am grateful for it.)
I have an SX28 controller, and a TLC0832 2-Channel ADC.
I have used this chip with the BS2 without any problems, but when I try my interface with the SX, I am getting a lot of noise on the output.· The Voltage going into the ADC is a steady 3.3 with a reference of 0V and 5V.
Here is the portion of code that is killing me right now...
·'READ ADC #1
·PULSOUT RA.0,5
·SHIFTOUT RA.1, RA.2,MSBFIRST,%110\3
LOW RA.1
·PAUSE 1
·SHIFTIN RA.3, RA.2,MSBFIRST,VENDOR_VARIABLE
·LOW RA.3
The ADC requires a shiftout command to get the data (%110).· This is good and clean (see attached photo 1)
The Shiftout is going to the ADC DataIn, and is accepted cleanly.
The low is just to make sure the Data Pin is pulled low.
Now things get messy.· When I run a Shiftin,·I seem to be often times losing the last bit transmitted to the SX.
Attachment 2 is what I expect to recieve.
Attachment 3 is what I am also recieving. (note the last bit is 'cleaved' off)
Unfortunately, this is the MSB, so it is Huge Jumps, and I can't figure out why I am getting 'mixed signals'...The voltage to the chip is not changing, the chip works fine with a BS2...I think I just need some help!!!
Shaun
·(no...this isn't intended to be a Parallax Oscope ad...but I am grateful for it.)
Comments
Can you post the complete program ?
Can you post the working BS2 code ?
In your SHIFTIN your using MSBFIRST, then later you say the LAST bit is the MSB ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
·
In fact just your 3rd statement helped me out...I was shifting backwards...it wasn't the MSB that was coming/going...it was the LSB...
THANK YOU, BEAN!!!!!!!
Your welcome.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
·