| ??? 09/24/02 03:22 Read: times |
#29587 - RE: ADCs (max1112 > TI0838) |
My code works, but as with the Max1112 my channels still "clash". When trying to read channel 0, if the input is placed on channel 0-7 it still reads the same input. Two different types of ADCs! What am I doing wrong? :-p
My ASM code I wrote is : call time_delay_very_short CLR P1.5 ; P1.0 connects to SLK ; P1.1 connects to CS ; P1.4 connects to DIN ; P1.5 connects to DOUT Sensor_0: CLR P1.1 CALL Time_Delay_Very_Short MOV A, #10001111b MOV R6, #8 Sensor_0_loop: RLC A MOV P1.4, C CALL Time_Delay_Very_Short SETB P1.0 CALL Time_Delay_Very_Short CLR P1.0 CALL Time_Delay_Very_Short DJNZ R6, Sensor_0_loop SETB P1.0 CALL Time_Delay_Very_Short CLR P1.0 CALL Time_Delay_Very_Short SETB P1.0 CALL Time_Delay_Very_Short CLR P1.0 CALL Time_Delay_Very_Short MOV R6, #8 Sensor_Input: MOV C, P1.5 RLC A SETB P1.0 CALL Time_Delay_Very_Short CLR P1.0 CALL Time_Delay_Very_Short DJNZ R6, Sensor_Input MOV R6, #8 Extra_clocks: MOV R6, 6 SETB P1.0 CALL Time_Delay_Very_Short CLR P1.0 CALL Time_Delay_Very_Short DJNZ R6, Extra_Clocks SETB P1.1 CALL Time_Delay_Very_Short MOV P2, A jmp sensor_0 Time_Delay_Very_Short: MOV R7, #50 Delay_Loop: DJNZ R7, Delay_Loop RET End Dennis Welbourn wrote: ------------------------------- Hi Jeff, I've frequently used National's ADC08034, a close cousin of the 0838. My code was written in C and optimized for timing. The part was easy to use, and works just like the datasheet says it should. I've got both the National and TI datasheets here, they work alike (we use TI as a second source). What does your ADC code for this part look like? Dennis |
| Topic | Author | Date |
| ADCs (max1112 > TI0838) | 01/01/70 00:00 | |
| RE: ADCs (max1112 > TI0838) | 01/01/70 00:00 | |
| RE: ADCs (max1112 > TI0838) | 01/01/70 00:00 | |
RE: ADCs (max1112 > TI0838) | 01/01/70 00:00 |



