Slay78
Newbie level 6
Hello all,
First of all my AD converter on LPC2148 (dev MCB2140, JTAG ULINK2) works fine when i set CLKS=000 (11clock/10bit) in AD0CR register. I get also the result of AD conversion of 10bit (value from 0 to 1023) in AD0DR register, and that's ok.
The problem:
When i set CLKS=111 (setting the AD to 4clock/3bit) i expect my result in AD0DR to be 3 bit long (?), and a result from AD conversion in range 0 to 7? But that's not happening, in debugger i run and stop debugging and i read the values from Peripherials/ADConverter which i previously set and everything seems fine exept the value from edit box V/Vref=0x03FF.
So if my conversion is 3bit long, for some reason i get 10bit result, instead 3bit? Why is that? Should my value in V/Vref be just 0x0007 since is 3bit conv.
Thanks
First of all my AD converter on LPC2148 (dev MCB2140, JTAG ULINK2) works fine when i set CLKS=000 (11clock/10bit) in AD0CR register. I get also the result of AD conversion of 10bit (value from 0 to 1023) in AD0DR register, and that's ok.
The problem:
When i set CLKS=111 (setting the AD to 4clock/3bit) i expect my result in AD0DR to be 3 bit long (?), and a result from AD conversion in range 0 to 7? But that's not happening, in debugger i run and stop debugging and i read the values from Peripherials/ADConverter which i previously set and everything seems fine exept the value from edit box V/Vref=0x03FF.
So if my conversion is 3bit long, for some reason i get 10bit result, instead 3bit? Why is that? Should my value in V/Vref be just 0x0007 since is 3bit conv.
Thanks