| ??? 05/11/03 21:55 Read: times |
#45263 - RE: ADuC812 and ADC problem Responding to: ???'s previous message |
hi everyone.
Still not working; I’m still confused how to sync. Between the data for ADC and take these data and do DAC AS 8bit only The code that I modified is as follow: ;-------------------------------------- ORG 00000H ; Execution Starts Here ; set ADCCON1 register to enable Normal ; A/D conversion mode MOV 0EFH,#07CH ; set ADCCON register for 8 bit mode ; with DAC1 power-off MOV 0FDH,#0FDH ;------------------------------------ ; MAIN LOOP1: ; set ADCCON2 register for Continuous ; Conversions at channel 0 MOV 0D8H,#020H ; Store the result of Con. ; from ADCDATAH into R3 MOV R3,0DAH ; Store the result of Con. ; from ADCDATAL into R2 MOV R2,0D9H MOV A,R3 ADD A,R2 MOV R4,A ; Move the data into DAC0L MOV 0F9H,R4 CALL DELAY ; Call delay JMP LOOP1 ; ;_____________________________________ ; Subroutines DELAY: ; delay 100ms MOV R7,#200 ; 200 * 500us = 100ms DLY1: MOV R6,#229 ; 229 * 2.17us = 500us DJNZ R6,$ ; sit here for 500us DJNZ R7,DLY1 ; repeat 200 times (100ms delay) RET ;______________________________________ End ; End Of Program |
| Topic | Author | Date |
| ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem - Hans | 01/01/70 00:00 | |
| RE: ADuC812 and ADC problem - Hans | 01/01/70 00:00 | |
| RE: ADuC812 and, Raghu, Rami | 01/01/70 00:00 | |
| RE: ADuC812 and, Raghu, Rami | 01/01/70 00:00 | |
| RE: ADuC812 and, Raghu, Rami | 01/01/70 00:00 |



