??? 03/22/06 16:36 Read: times |
#112792 - UART Responding to: ???'s previous message |
Lammertyn John said:
Had some help from the analoge devices compagny. They send me a little program for this board with LDR and LED Well, that's basically the single-conversion operation I've suggested you to try above... I wonder what makes their code work as compared to yours, whether it is the setting of DACCON or the using of single-conversion mode, or the particular sequence of operations they use... What happens for example, if you try to use SETB CCONV _after_ setting up ADCCON2 in your original code... You should also perhaps check if there is anything relevant in the available erratas and appnotes. John said:
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? What you describe is basically a single-direction (simplex) version of a bus called most often SPI. The PC does not have a generic SPI port; and although sometimes it is simulated on COM or LPT ports, it is not a good solution and leads to a host of problems. It is much better option to use the UART on the ADuC8xx and after level conversion using a MAX232 or similar, feed it into the PC's COM port. You will find ample guidelines and examples here, searching for "RS232" and "UART" here; start perhaps with the UART-related sections of Tutorials and FAQ here (buttons on the left). And, of course, read the relevant sections of the "bible". Does there exist any program that saves this data on the harddisk and monitor them when needed to read out? Any serial terminal program will do, virtually all of them have the option to log incoming communication into a file. If you chose the format of data you transmit in a smart way (ascii, space or tab or comma delimited values, records delimited by CR/CRLF), you can then easily feed the resulting logfile into Excel or any similar tool or process them in a simple way by a program you write. Jan Waclawek |
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 |