Power

Status
Not open for further replies.

Demon X

New Member
Hi, I am new to the forums and new to PIC Progamming also. I'm OK with programming PICs for the moment, but what I want to know is what is the best way to supply power to a PIC16F88? I have tried using a USB wire but the chip got very hot after a few seconds (It still works). Is that normal or not? USB supplies 5v which is the chip's optimal voltage, but maybe the current is too high?
 
If it's getting hot you've done something SERIOUSLY wrong, most probably connected it the wrong way round?.
 
Well it would appear I am connecting it wrong because I am connecting the black wire to + and red to -, but if I connect it the "right" way around, absolutely nothing happens whatsoever... If I connect the "wrong" way, the buzzer I have attatched (I should really be using LEDs but I cant find any lying around so Ill have to buy some...) makes a "click" noise as I would expect it to.
What is the voltage output by the I/O pins when the chip is first powered up?
 

Without a correctly written program inside, the PIC won't do anything.

It shouldn't make a 'click noise', it's only doing so via the forward biased prootection diodes that are cooking the chip, and probably destroying your USB port?.

What is the voltage output by the I/O pins when the chip is first powered up?

None, the pins (fairly obviously) default to inputs when the PIC powers up.
 
1. There is a program in the chip that should generate a tone on the buzzer
2. The USB port is fine, Windows disables ports if too much current is drawn.
3. The chip is fine.

The only items I have to hand are:

- PIC16F88
- Breadboard (PIC aligns perfectly)
- Buzzer
- USB power lead
- JDM Serial Programmer

How can I get the buzzer to make a noise?

The "click noise" I hear simply means power is going to the buzzer, aka it is going from position 0 to position 1...

Here is the pinout:

1-####-18
2-####-17
3-####-16
4-####-15
5-####-14
6-####-13
7-####-12
8-####-11
9-####-10

The buzzers (+) lead is connected to pin 18, RA1. The buzzers (-) lead and the USB (-) lead are connected to pin 14, Vdd. The USB (+) lead is connected to pin 5.

This should work, right?
 
Last edited:
I am pretty sure the chip is fine because PICPgm recognised it and "Verifying" the ROM is successful. Also I am not sure what the buzzer requires because I simply ripped it out of my PC Case. It should only require 3.3V, right?

I've changed the program to use PORTB but it still has the same effect. Here is the code:

int main () {
while (1) {
PORTB = 0xFF;
Delay_ms(1);
PORTB = 0x00;
Delay_ms(1);
}
}

(Yes I know, this turns on/off ALL the pins. I intentionally did that...)
This code should generate a 500Hz tone.
 
What compiler are you using? Post all your code (put
Code:
 before it and [/co de], without the space, after it) as your problem could be in other places such as the config settings. BTW, some of port B can be analogue. You also don't appear to setup the TRIS registers.

Mike.
 
Nigel Goodwin said:
No, he leaves the I/O pins as inputs, so it won't ever work.
We can't know that without seeing all the code. Edit, as it's main we could guess that TRIS isn't set up.

Mike.
 
Nigel Goodwin said:
I'm assuming that's his entire code?

As my edit said, he showed his main function and therefore there isn't any other code. So, you are correct, it is his entire code.

Mike.
 
>.> I knew i'd forgot something! Ill test that now

EDIT: WOW! It worked Thank you for pointing out that silly mistake The buzzer now makes a noise as I expected, although I dont think it's 500Hz, Ill have to look at the clock speed I know exactly what was wrong before, setting PORTA to 0xFF simply doesnt work because there are less than 8 output pins...
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…