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.

Issue with Pic18f252?

Status
Not open for further replies.

darkfeffy

New Member
Hello,
I am trying unsuccessfully to drive the n-mosfets in my H-bridge inverter. I am using the PIC18f252 together with two IR21844 MOSFET drivers. After programming the PIC with the Pickit2 programmer, the PIC responds well when out of its application circuit (that is when disconnected from the drivers). In fact CCP1 and CCP2 output pins are almost exactly like on the MPLAB Sim interface. When connected to target circuit, the pins stop working and all go high. I thought the PIC is not able to supply the current demanded by the drivers; so I tried inserting, progressively, resistors of 22 Ohm, 33 Ohm, 100 Ohm and 1kOhm. With the first two, the result is exactly similar to when the pins are directly connected to the drivers. With the others, the pin voltage does not get to the driver input at all. Just a straight 5-volt on the driver input (one end of the resistor) but with the desired signal on the other end of the resistor (the PIC-facing end).
Furthermore, thinking it was an issue with the Mosfet driver, I used a 50kHz function generator (in TTL mode) and the driver responded wonderfully. I do not want to draw hasty conclusions, but Ineed to know if there is an issue with the 18f252 and what possible solution(s) to apply. I have spent sleepless nights on this matter and given that I have bought a packet of 18f252s I would greatly appreciate your rapid reply.
Thanks. Edwin
 
Considering you've fitted current limiting resistors resitors and the PIC is working fine with 100 ohm and 1K, it's absolutely obvious that the drivers are requiring substantial current to feed them - beyond the capacity of a PIC. It also sounds like your function generator can supply a hefty output, as most can.

I would suggest checking the circuit, and the requirements of your drivers.

You might also try posting your circuit here for suggestions.
 
Hi,
From its datasheet, the ir21844 gate driver maximum input biais current is 20uA (micro amps). The pic 18f252 datasheet says on page 3 that peripherals can source/sink 20mA. So what's wrong? Please have a look at the pdf attachment. It contains the circuit diagram.
Thanks
Edwin
 

Attachments

  • h-brige.pdf
    29.9 KB · Views: 344
Hi,
From its datasheet, the ir21844 gate driver maximum input biais current is 20uA (micro amps). The pic 18f252 datasheet says on page 3 that peripherals can source/sink 20mA. So what's wrong?

It's not requiring 20uA, it's wanting considerably more than 20mA.

Test it without the PIC in circuit, feed the inputs from 5V via a 1K resistor, and see how that works.
 
Last edited:
It's not requiring 20uA, it's wanting considerably more than 20mA.

Test it without the PIC in circuit, feed the inputs from 5V via a 1K resistor, and see how that works.
No Nigel. The supply of the PIC measures nowhere near 20mA. Often when it stops working the pic is drawing a maximum of 15mA. Sometimes even 9mA. Meanwhile when it functions normally, it draws 16mA.
Also, I realised something: the IN pin of the IR21844 gate driver has a 5Vdc signal when it is on. I guess it is this voltage which somehow "forces" the PIC output to remain high. Is this normal of the IR21844? How do we solve this problem? I isolated the Vss (logic ground) of the IR21844 but still have the same problem.
Help!!!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top