Problem With Input Port-F Pin4 on PIC18F6520

(instructions, reset, WDT, specifications...) PIC17Cxx, PIC18Fxxx

Re: Problem With Input Port-F Pin4 on PIC18F6520

Postby ric » Wed Jul 02, 2014 10:23 am

As I suspected, it's an incorrect value you wrote to one register.
You are clearing CMCON, but the correct value to set all inputs as digital is to write 0x07 to CMCON.
See example 10-6 in the datasheet, and figure 20-1
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: Problem With Input Port-F Pin4 on PIC18F6520

Postby disremy » Fri Jul 04, 2014 11:34 am

:D :D
I never used comparator module, and usally you have to put 0x00 to inactivate a peripheral !!
Exact I put 0x07 in CMCON and it is good now RF4 follow input level.
Tanks A lot
disremy
 
Posts: 8
Joined: Mon Jun 30, 2014 2:09 pm
PIC experience: Professional 5+ years with MCHP products

Previous

Return to 16-Bit Core

Who is online

Users browsing this forum: No registered users and 11 guests

cron