Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

pic16f882

Status
Not open for further replies.

birdman0_o

Active Member
Hey guys,

I just wasted 2 hours trying to get an LCD to work on PORTA of this chip. I switched it to PORTC and then it worked fine...I checked the DS and couldnt see any possible issues. Could somebody enlighten me?

ANSEL was cleared.
Is CMCON cleared by default? thats the only thing I didnt try...
 
Hey guys,

I just wasted 2 hours trying to get an LCD to work on PORTA of this chip. I switched it to PORTC and then it worked fine...I checked the DS and couldnt see any possible issues. Could somebody enlighten me?

ANSEL was cleared.
Is CMCON cleared by default? thats the only thing I didnt try...

you mean comparators? no, by default they are on, consult the datasheet to find the value that switches them off.
 
The comparators are off by default. I can't see any reason it wouldn't work on PORTA.

Edit, are you sure you accessed ANSEL/H in the right bank. They are in bank 3 on this chip.

Mike.
 
Last edited:
The comparators are off by default. I can't see any reason it wouldn't work on PORTA.

Edit, are you sure you accessed ANSEL/H in the right bank. They are in bank 3 on this chip.

Mike.

Are you sure?
I always have to include
Code:
	movlw	0x07
		movwf	CMCON			;turn comparators off
at the start of my programs when ever i program on the 16F628A to get porta to work right
 
Last edited:
Yea, im not using the 628A though, the 88X series takes care of that :)
Yea i have no clue either mike!

Im having a bad night :(
I soldered up the clock to get it off the breadboard, everything works EXCEPT!
Now it displays every number except 1 and 4?!?!? Perhaps I need a good night sleep to figure these two things out...
 
Are you sure?
I always have to include
Code:
	movlw	0x07
		movwf	CMCON			;turn comparators off
at the start of my programs when ever i program on the 16F628A to get porta to work right

On the later chips they turned them off by default. I think this is because it frustrated so many people.

Mike.
 
Hey Mike, I've been having this weird problem with my programmer (pickit 2 )
When I try to use ICSP, it doesnt recognize the chip, but when I plug it into the zif socket it works...I did work prior too. At first it did this with the pic16f88, then didnt work. Then it worked with the 882, but now doesnt work.

Just a frustrating night.
 
I thought the problem with the 16f88 was the timer1 oscillator sharing the ICSP pins. With the 882 are you using intosc with MCLR turned off?

Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top