[PicForth] AtoD (again)

David Trethewey exoren22 at gmail.com
Wed May 24 00:34:13 CEST 2006


Hi all,
Sorry about that previous message ( forgot the shift when I hit enter )
I am currently working on a project fir the pic16f876 and I am using
picforth. My concern is with the analog to digital converter module. I have
read the documentation for the pic and its A-to-D registers and have come
across a few problems. First, the documentation says, for the ADCON1
register, bits 0,1,2,3 and 7 are used, but in the picforth.fs file these are
not the bits used, and they do not have the corresponding names.
My second problem is from what looks to me to be a typo of some kind. In the
pdf datasheet it lists the bits of the ADCON0 register, and it gives a brief
description of each one. Under the go//done bit it explains:
GO/DONE: A/D Conversion Status bit
If ADON = 1:
1 = A/D conversion in progress (setting this bit starts the A/D conversion)
0 = A/D conversion not in progress (this bit is automatically cleared by
hardware when the A/D
conversion is complete)
This clearly is confusing, because it is in fact the next ( implemented )
bit that is named ADON. Its description:
ADON: A/D On bit
1 = A/D converter module is operating
0 = A/D converter module is shut-off and consumes no operating current

Any helpful hints for implelentation would be gratefully appreciated.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rfc1149.net/pipermail/picforth/attachments/20060523/3ad50ee2/attachment.htm 


More information about the PicForth mailing list