Hi Mr. Taylor,
I did those changes to display 10 Bits value in Visual Basic program for USBDemo, it works perfectly, but only for one channel, AN0. What I have to change in picbasic USBDemo program to obtain two 10 Bits channels, AN0 and AN1?
;incomming ADC reading and PORTA status
----------------------------------------
;pAN0.Value = BufferIn(1) ' Display ADC results to the progress bars
pAN0.Value = Val(BufferIn(1)) + Val(BufferIn(2)) * 256 'Display ADC for AN0
;pAN1.Value = BufferIn(2) ' Display ADC results to the progress bars
'
;lValAN0.Text = Val(BufferIn(1)) ' Display Progress bars Values
lValAN0.Text = Val(BufferIn(1)) + (Val(BufferIn(2)) * 256 'Display ADC for AN0
;lValAN1.Text = Val(BufferIn(2)) ' Display Progress bars Values
Note:
Also is necessary to change maximal value of progressbar properties pAN0 from 255 to 1023
Thanks
Kuba230
Bookmarks