|
|
View previous topic :: View next topic |
Author |
Message |
Jerry712731
Joined: 14 Apr 2004 Posts: 12 Location: UK
|
PIC16C774 A-D Right Justification |
Posted: Wed Apr 14, 2004 10:02 am |
|
|
I am using a 16C774 with a 12 bit ADC, the results can be Left of Right Justified in assembler.
Is there a setting that can be used, or has it been incorporated in a later version. I am using 3.181
Thanks |
|
|
Ttelmah Guest
|
Re: PIC16C774 A-D Right Justification |
Posted: Wed Apr 14, 2004 10:17 am |
|
|
Jerry712731 wrote: | I am using a 16C774 with a 12 bit ADC, the results can be Left of Right Justified in assembler.
Is there a setting that can be used, or has it been incorporated in a later version. I am using 3.181
Thanks |
Try using ADC=16 in the device statement.
On chips with lesser (10 bit) AD converters, you get:
ADC=8 - sets the chip to left justify, and returns the MSB only
ADC=10 - sets the chip to right justify, and returns both bytes.
ADC=16 - sets the chip to left justify, and returns both bytes.
I have not tried this with the 12bit ADC, but it may work. Otherwise use the #bit directive, and control the justify bit yourself.
Best Wishes |
|
|
Guest
|
|
Posted: Wed Apr 14, 2004 10:40 am |
|
|
ADC = 12 returns a left justified result for both bytes.
Looks like I will have to go the #Bit way
Many thanks |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|