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.

Problem in A Port of Pic and Programming

Status
Not open for further replies.
Hello. I am doing my mini project. I have Pic16f628a. It have two ports A & B.
What I am doing take input from A and give output at B. I have pulled up the A.
Ok. Upto this I had no problem. But while programing I had tested my pic in so many ways. Sometimes it gives flicker (Leds) on output pins. Doesn't take input from A.
So I tried just simple blinking of leds. It also sometimes blinks, sometimes not, When I bring my finger near to microcontroller Blinking stops. I have programed from different pickit2. On pcb circuit, on breadboard with three different Chips. Since I have three Pic16f628A. Also reinstalled Mplab and Hi tech c compilers. Checked power supply (with multimeter). Where I am doing mistake. PLZ HELP. :-(
 
We need two things...... Circuit and code..... Most pic16f628a problems are to do with the comparators one of your first commands needs to load the CMCON register with 7, then port A will be digital....
 
Most pic16f628a problems are to do with the comparators one of your first commands needs to load the CMCON register with 7, then port A will be digital....

I got caught with that little trap myself just a couple of days ago!.:(
A hour or so of head scratching, why does this crazy port not work?:confused:
RTFM - the CMCON register - instant fix.:)

JimB
(Overdosing on smilies)
 
Thnks. I want to know why and how to do this..
What!

Do you have code and a circuit???? If you check the links in my signature... Nigel's tutorials are in ASM and I have recoded them into C.. All you need is there..
 
Thank u so much experts. ;) Solved my problem.
If any one having same problem or is beginner read-
cmcon=0x07

TRISA=0xff not "TRISA=1"

If (-----==1) "not" if (----=1)

Also have good connections of ICSP while programming. Don't use breadboard while u program a chip.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top