18F1220

Coding and general discussion relating to user created compiler modules

Moderators: David Barker, Jerry Messina

Post Reply
Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

18F1220

Post by Widgetman » Sat Jan 31, 2009 3:36 pm

Hi,
I decided to try and use a 18F1220 in a design with the A/D, and was wondering if anyone had any feedback on this part. Is it supported in the compiler, and does anyone have a exanple reading a analog voltage off the A/D. Any input would be greatly appreciated.
Thanks

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Re: 18F1220

Post by octal » Sat Jan 31, 2009 3:53 pm

Just some toughts :?
Widgetman wrote:Hi,
Is it supported in the compiler
when I check the folder \Mecanique\Swordfish\Includes I can see a lot of files, among them 18F1220.bas
Widgetman wrote:Hi,
and was wondering if anyone had any feedback on this part. ... Any input would be greatly appreciated.
Thanks
At the top of the forum's Page I can see a link "Image search" I think it can be helpful to click on it !

User avatar
ohararp
Posts: 194
Joined: Tue Oct 03, 2006 11:29 pm
Location: Dayton, OH USA
Contact:

Post by ohararp » Sun Feb 01, 2009 12:39 am

Widdgetman,

I use the 18F1220 with PDS and it has been a great chip. I haven't ported any code over to it yet since the firmware in my clocks is pretty rock solid as it is. Overall, great chip and the internal oscillator on these is pretty good!
Thanks Ryan
$25 SMT Stencils!!!
www.ohararp.com/Stencils.html

Widgetman
Posts: 136
Joined: Sun Dec 16, 2007 7:39 pm
Location: Florida

Thanks Guys !!!

Post by Widgetman » Sun Feb 01, 2009 4:21 pm

Thanks a bunch guys for all the feedback. Has anyone used the A/D feature and can anyone post an example on how to do a conversion. Sorry I did not see it in the include list Octal. I must have overlooked it.
Thanks

User avatar
ohararp
Posts: 194
Joined: Tue Oct 03, 2006 11:29 pm
Location: Dayton, OH USA
Contact:

Post by ohararp » Sun Feb 01, 2009 5:31 pm

Other than using the ADC module you should use these settings on porta:

TRISA.0 = 1 ' Setup bit-0 of PortA as an input
ADCON1 = %10000010 ' Set PORTA analog and right justify result
Thanks Ryan
$25 SMT Stencils!!!
www.ohararp.com/Stencils.html

Post Reply