Hi Mr. Taylor,
I did not tray still your advice for modification of USBDemo program, because I take my holiday. When I com back, then I will try.
Thanks,
Kuba230
Hi Mr. Taylor,
I did not tray still your advice for modification of USBDemo program, because I take my holiday. When I com back, then I will try.
Thanks,
Kuba230
Hi Mr. Taylor,
I made changes of USBDemo picbasic code according your advice and after compilation I obtain error messages:
Error[113 ] c:\pbp_prog\usbdemo.asm 61 : Symbol not previously defined (ADRead)
Error[113 ] c:\pbp_prog\usbdemo.asm 62 : Symbol not previously defined (ADRead)
I do not know why is happen?
Thanks,
Kuba230
Oops, I should have compiled it first.
Try these 2 lines instead...<br>Code:DATATOSEND[ADCON0.2*2]=ADRESL DATATOSEND[ADCON0.2*2+1]=ADRESH
DT
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
lValAN1.Text = Val(BufferIn(3)) + (Val(BufferIn(4)) * 256 'Display ADC for AN1
DT
Hi Mr. Taylor,
Everything is working very well.
Thank you very much for your help.
Kuba230
Bookmarks