??? 08/22/09 10:19 Read: times |
#168457 - More details needed Responding to: ???'s previous message |
Are you sending the ADC values in ASCII or binary form?
If you send them using ASCII, you will consume four bytes/value - three digits and a separator. At 19200 baud, your link manages about 2k characters/second or 500 measurements. For a 4Hz signal, that will give 125 samples/period. You can measure concurrently with the transmission, but must make sure that the ADC is either run synchronously with the serial port, or at a lower speed than the maximum transfer rate of the serial port. If you send your data in binary form, you will no longer need any separator character for 8-bit data, so the serial port will manage 2k samples/second, or 500 samples/period. Switching from a 8-bit ADC to a larger ADC, but max 14 bits, you can send the data binary in two bytes - use 7 bits of each byte for data, and use the high bit to signal first/last byte of each sample. Have you made sure that your current implementation are noise-free and that the signal has the proper amplitude so that you can use the full range of the ADC and without a lot of low-bit noise? Switching to a better ADC with more bits doesn't help unless you first make sure that your solution has stable voltages to the processor and any ADC voltage reference. |