2013-10-30

MCP3208 ADC all 8 channels tested OK

Now I am testing all 8 channels in one go.  I connected A0~3 to 3V3/2 and A4~7 to LM385 2.5 (actually 2.47V).  Then I ran the following tests.

 testBlinkOlimexLed1();
testBlinkLpc1114LedP03();
testOlimex7segmentLed0101();
testMax7219v04(SPI_CHANNEL_0);

testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_0);
testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_1);
testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_2);
testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_3);
testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_4);
testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_5);
testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_6);
testMcp3208(SPI_CHANNEL_1, ADC_CHANNEL_7);


And I go the following results.

ADC Channel = 0
ADC result milliVolt = 1655

ADC Channel = 1
ADC result milliVolt = 1658

ADC Channel = 2
ADC result milliVolt = 1655

ADC Channel = 3
ADC result milliVolt = 1655

ADC Channel = 4
ADC result milliVolt = 2488

ADC Channel = 5
ADC result milliVolt = 2482

ADC Channel = 6
ADC result milliVolt = 2489

ADC Channel = 7
ADC result milliVolt = 2482

The results look good.  And I call it a day. 



*** MAX7219 Test v04 - 2013oct30hk1112 ***
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  06 00 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  06 00 00 
RxBuf  ff ea a3 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 0
ADC result hex = aa3
ADC result decimal = 2723
ADC result milliVolt = 1655

*** End of Test. *** 

*** End of Test. *** 
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  06 40 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  06 40 00 
RxBuf  ff ea a8 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 1
ADC result hex = aa8
ADC result decimal = 2728
ADC result milliVolt = 1658

*** End of Test. *** 

*** End of Test. *** 
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  06 80 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  06 80 00 
RxBuf  ff ea a3 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 2
ADC result hex = aa3
ADC result decimal = 2723
ADC result milliVolt = 1655

*** End of Test. *** 

*** End of Test. *** 
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  06 c0 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  06 c0 00 
RxBuf  ff ea a3 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 3
ADC result hex = aa3
ADC result decimal = 2723
ADC result milliVolt = 1655

*** End of Test. *** 

*** End of Test. *** 
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  07 00 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  07 00 00 
RxBuf  ff ef fe 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 4
ADC result hex = ffe
ADC result decimal = 4094
ADC result milliVolt = 2488

*** End of Test. *** 

*** End of Test. *** 
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  07 40 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  07 40 00 
RxBuf  ff ef f3 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 5
ADC result hex = ff3
ADC result decimal = 4083
ADC result milliVolt = 2482

*** End of Test. *** 

*** End of Test. *** 
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  07 80 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  07 80 00 
RxBuf  ff ef ff 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 6
ADC result hex = fff
ADC result decimal = 4095
ADC result milliVolt = 2489

*** End of Test. *** 

*** End of Test. *** 
*** MCP3208 Test - 2013oct27hk0948 ***

*** Tx Rx buffer contents before ADC *** 
Index    0  1   2
TxBuf  07 c0 00 
RxBuf  00 00 00 

*** Tx Rx buffer contents after ADC *** 
Index    0  1   2
TxBuf  07 c0 00 
RxBuf  ff ef f3 

***ADC Results Summary *** 
SPI Channel = 1
ADC Channel = 7
ADC result hex = ff3
ADC result decimal = 4083
ADC result milliVolt = 2482

*** End of Test. *** 

*** End of Test. *** 

.END

No comments:

Post a Comment