Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PROBLEM WITH MY PIC16F877A development board

Status
Not open for further replies.

X4ROY

Newbie level 6
Joined
Jun 4, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore
Activity points
1,416
i have purchased a locally made programmer and development board separately .
The programmer seems to be working as i uploaded the hex file generated from MPLAB IDE into the PIC using Micropro . it wrote " program sucessfully completed " then i read from the chip and checked it it was programmed .
the program was to blink two LEDS connected to ports RB2 and RB3 .

PROBLEM : i put the Programmed Pic into the development board then connected the +ve of the led to ports rb2 and rb3 separately for the two LEDS . next the common -ve terminal of the Leds were connected to the ground terminal , well in my development board i cant see the terminals of mclr , gnd , vcc , vdd , vss all i see is a bunch of input outports of A , B , C ,D and at the position near the power supply there are three pins reading 12V , 5V , GND now considering this pin to be ground i have connected the common negative terminal of LED to it . POWERED IT UP and nothing happens . my development board did not come with any manual so i have no clue please help ... im a beginner

i have attached the c code i wrote for this .
 

Hi,

Cannot help you with that code, but would suggest you make it as simple as possible, just turn rb2 ON and rb3 OFF, no delays, so that when it runs on your hardware one of the leds should actually light up.
A common problem with the Blink is that you can have the delays so short or wrong you never see the leds turn on.
Also connecting the leds the wrong way round can have the same effect.

As for the hardware, well you should have a resistor between the pic port and the led otherwise you can burn out the pic. Try 330 or 470 OHMS - you should see something.

You also need to check that pin1 Mclre is connected directly to +5v or via a resistor of some value, typically 4k7 or 10k. If it is not pulled up then the Pic chip will not run.

Also what oscillator has the board got connected to it ? -again if not properly connected the pic will not run. - You config / program must also agree with the hardware oscillator.

Can you send any info or pictures of the dev board.
 

    X4ROY

    Points: 2
    Helpful Answer Positive Rating
dude the problem is i set port rb2 as high i put the led on it and that gnd this led doesn glow ....
here is the pic of my dev board
please tell me if my connections were right picture attached
rb2 to led +VE , led _ve to resistor , resistor freee end to gnd .
 

Hi,

That board looks fine, its got the crystal onboard and Mclre will be pulled up as you have a Reset switch as well on pin1.

The attached diagram shows the two ways you can connect a led to a pic port, it can be taken up to +5v or down to 0v

On the 16F877a the max current on any one pin is 25ma so you must use a resistor or risk blowing that port.
 

Hi again,

Just in case you are still having code problems etc, attached is a .hex file that will flash all bits of PortB on and off at once.

If you have a 4meg crystal on that board it will flash every five seconds, is it greater than 4 meg, then the time will reduce to a minimum of 1 second at 20meg.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top