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?
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?
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.
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?
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...
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.
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.
>.> 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...