ARandomOWl
New Member
I am making a PIC-based voltmeter/thermometer and I would like to use a USB interface as a way of logging data. My PIC will need to read a few ADC channels, do some simple calculations then display the results on an LCD and relay them through USB to the PC.
Now I would like to send the data to the PC in the main program loop on demand. Is there a way I can do this without using interrupts for USB? Or is USB such that the bus must be kept alive using interrupts?
Maybe I can place data in a buffer during my main loop and send it to the PC during the USB interrupt. As long as the interrupt occurs more often than I take readings, no data should be lost.
The data I am sending will be about 12 bytes long and will need to be sent about 10 times per second.
As above I am thinking I could implement interrupt transfer method through HID. If anyone could point me in the right direction that would be great, thanks.
Now I would like to send the data to the PC in the main program loop on demand. Is there a way I can do this without using interrupts for USB? Or is USB such that the bus must be kept alive using interrupts?
Maybe I can place data in a buffer during my main loop and send it to the PC during the USB interrupt. As long as the interrupt occurs more often than I take readings, no data should be lost.
The data I am sending will be about 12 bytes long and will need to be sent about 10 times per second.
As above I am thinking I could implement interrupt transfer method through HID. If anyone could point me in the right direction that would be great, thanks.