??? 03/22/06 09:13 Read: times |
#112762 - ADC to pc with serial Responding to: ???'s previous message |
Had some help from the analoge devices compagny. They send me a little program for this board with LDR and LED :
$MOD832 ; Use 8052&ADuC832 predefined symbols CHAN EQU 3 ; convert this ADC input channel.. ; ..chan values can be 0 thru 8 ;_______________________________________________________________ ; BEGINNING OF CODE CSEG ORG 0000h JMP MAIN ; jump to main program ;_______________________________________________________________ ; INTERRUPT VECTOR SPACE ;=============================================================== ; MAIN PROGRAM ORG 004Bh MAIN: ; PRECONFIGURE... MOV ADCCON1,#080h ; power up ADC MOV ADCCON2,#CHAN ; select channel to convert MOV DACCON,#03DH ; Dac 0 0-5V 12bits ; PERFORM REPEATED SINGLE CONVERSIONS... AGAIN: MOV A,#01H ; Delay length SETB SCONV ; innitiate single ADC conversion ; ADC ISR is called upon completion JNB ADCI,$ CLR ADCI MOV DAC0H,ADCDATAH MOV DAC0L,ADCDATAL JMP AGAIN ;_______________________________________________________________ END Now i was wondering what I need to store the ADC-values on the harddisk of my computer (like every 0,5 seconds). I've worked with seven segments where i used serial interface who i made from three I/O pins; one DE (data enable), one SI (serial in) and one CK (shift clock). So for every byte i used the clock to put this in a shift register (one pulse for each bit, so eight pulses for a byte). Is this system simular as the usual serial interface in connection with the computer, or is there more to it? Does there excist any program that saves this data on the harddisk and monitor them when needed to read out? Best Regards, John @ JW : Prof J.Kovac said "haay" :-) |
Topic | Author | Date |
ADC / DAC with ADuC832 | 01/01/70 00:00 | |
code formatting | 01/01/70 00:00 | |
off topic and one idea | 01/01/70 00:00 | |
just a guess | 01/01/70 00:00 | |
guessing | 01/01/70 00:00 | |
blinkey | 01/01/70 00:00 | |
KnightriderLED | 01/01/70 00:00 | |
try single-shot AD conversion | 01/01/70 00:00 | |
ADC to pc with serial | 01/01/70 00:00 | |
UART![]() | 01/01/70 00:00 |