ADC and Serial Terminal ( I think Im loosing it)
TJHJ
Posts: 243
Hi all,
I have a LTC1298 hooked up to a linear actuator, that reads the analog position output on a 0-5v range.
So I take one and place it in the board. It works for a bit. Then it stops. I have checked the connections, all shows correct. I am now buffering against AC and negative voltage using an .1 uf cap and 1N4001 diode on the input to the adc. The other channel (Not in use) is tied to ground via a 1k resistor.
Once it stops I get the following on the serial terminal.
Note 972 is not the correct value either, but it shows 972 no matter what the analog voltage is.
When its working I get a clear screen followed by the adc value.
The test code I am using is as follows.
I just dont get how the term.out(0) is suddenly becoming translated to a decimal 0 value???? any ideas
I can remove the chip and place it in a PPDB and it works fine, replace it in the other board and the same problem occurs connected to the same prop pins. When I use a new ADC it seems to work for a few minutes before starting to act all weird, but is not consistent.
I am seeing analog voltage at the ADC pin just fine.
The connection from the serial terminal to the prop plug is kinda complicated, might this be the issue? Other serial test programs work fine. Such as repeating a word/sentence back at the computers.
It goes from the board to an AMP- sealed connector. From there to a 4 pin panel mount plug. A pig tail from the other side of the 4 pin panel mount plug to a bread board w/ a 4 pin header on it. To the prop plug.
PLease help,
Any suggestions or ideas are greatly appreciated.
TJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I owe everyone here a bunch, So thanks again for answering my dumb questions.
Projects. RG500 ECU system. PropCopter. Prop CanSat. Prop Paste Gun.
Suzuki RG500 in a RGV 250 frame.
Bimota V-Due (Running on the fuel injection system)
Aprilia RS250
I have a LTC1298 hooked up to a linear actuator, that reads the analog position output on a 0-5v range.
So I take one and place it in the board. It works for a bit. Then it stops. I have checked the connections, all shows correct. I am now buffering against AC and negative voltage using an .1 uf cap and 1N4001 diode on the input to the adc. The other channel (Not in use) is tied to ground via a 1k resistor.
Once it stops I get the following on the serial terminal.
0ADC = 972 0ADC = 972 0ADC = 972 0ADC = 972 .... over and over again.
Note 972 is not the correct value either, but it shows 972 no matter what the analog voltage is.
When its working I get a clear screen followed by the adc value.
The test code I am using is as follows.
Con _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 Obj Term : "Serial_Terminal" ADC : "CD_LTC1298" var long stack1[noparse][[/noparse]100] Pub run term.startbd(9600) ADc.start(16) repeat term.out(0) term.str(String("ADC = ")) term.dec(ADC.GetADC(0)) term.out(13) waitcnt(clkfreq +cnt)
I just dont get how the term.out(0) is suddenly becoming translated to a decimal 0 value???? any ideas
I can remove the chip and place it in a PPDB and it works fine, replace it in the other board and the same problem occurs connected to the same prop pins. When I use a new ADC it seems to work for a few minutes before starting to act all weird, but is not consistent.
I am seeing analog voltage at the ADC pin just fine.
The connection from the serial terminal to the prop plug is kinda complicated, might this be the issue? Other serial test programs work fine. Such as repeating a word/sentence back at the computers.
It goes from the board to an AMP- sealed connector. From there to a 4 pin panel mount plug. A pig tail from the other side of the 4 pin panel mount plug to a bread board w/ a 4 pin header on it. To the prop plug.
PLease help,
Any suggestions or ideas are greatly appreciated.
TJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I owe everyone here a bunch, So thanks again for answering my dumb questions.
Projects. RG500 ECU system. PropCopter. Prop CanSat. Prop Paste Gun.
Suzuki RG500 in a RGV 250 frame.
Bimota V-Due (Running on the fuel injection system)
Aprilia RS250
Comments