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.

3.3volts to 5volts problem with micro

Status
Not open for further replies.

giggler

New Member
Hi,

I'm playing with an Atmel 91SAM7S64. It has 5volt tolerant I/O. I've defined an input port, 8bits and print the sampled value as ASCII over a UART every 1/2second.

When I place a buffer 74HCT245N with it configured to drive the input lines, it draws like 180mA on reset and makes the micro freak out.

I should say, it only does this when driven by logic on the input side of the buffer, if I simply load the input side of the 74HCT245N with pullup's and dips to ground, it works.

If I remove the buffer, connecting the bus A-B then it works as expected, both driven with I/O and using the resistors and dips as mentioned above.

I want the buffer there as added input protection because the micro doesn't have diodes on the input lines.

So my question, why might I be getting hugh 180mA drains on the 5volts going to the buffer and why only when 5volt logic is driving its inputs.

Should its outputs to the micro have a series resistors (100R)? in most buses I've seen they don't.

Output enable for the buffer is software controlled and the problem at reset only occurs after I enable the buffer. I have double checked this and the direction control line with a scope.

Funny thing is, the 3volt supply doesn't seem to be affected but during the high current drain the ground is going crazy, jogging around at near a volt and ofcourse the 3.3volt and 5volt grounds are connected.

I notice, if I start the micro with the 5volts off, then once the micro is running, connect the 5volts it all seems to run. I should also say, while it runs and the scope shows the logic level at the micro pins change, they aren't read correctly by the micro.

Again, if I disconnect the buffer, wire link the buses, it reads and works as expected.

Circuit:
**broken link removed**

Any help greatly appreciated,
 
If the micro has 5V tolerant I/O I would look for another explanation. A CMOS chip needs to have all of its inputs at a defined level. 180 mA sounds like there is a floating input. If it were me, I'd try the experiment with logic driving the inputs with the pullups or pulldowns STILL connected. CMOS inputs do not draw appreciable current in either the high or the low state. An output with a floating input is basically shorting Vcc to GND an would be expected to draw substantial currents.
 
I once played with a micro that, when reset, by default it momentarily configured certain ports to outputs. Until the instruction was read to configure that port to an input it was in contention with the driver feeding that port. So for some milliseconds there were outputs fighting outputs. The solution was placing series resistors on those ports to limit the current. 100 ohms sounds about right.

creakndale
 
Cheers chaps for the swift replies.

Creakndale, I've double checked the datasheet, each I/O is set to input on reset with a weak internal pull up to 3.3v. If I disconnect the driving side of the 245 buffers but have them still sit in circuit, powering does not so a short so I think output to output contention could possibily be ruled out. Good idea however, one that I'd not considered.

Papabravo, you can tell I'm a s/w guy playing with electronics? well, done some more research. There are week pull downs on the offending 245's input all the time, even when driven by external logic. I think I'm gonna read abit more about CMOS and the HCT family, datasheet is very minimal.

Ok, since the large current drain only happens when the outputs of the 245 are connect to my 3.3v micro input port, I've looked at the micro's datasheet and it states in an eratta that any driver to an input should have an output impedance lower then 500R. Ofcourse a direct wire connect, only 1" long should easily fill this requirement, but so should it if I place low ohmic resistors in series with my micro, enough to limit current. I've done this, 390R and the logic levels seem to read fine now by the micro and importantly no large current drain is seen. I'm still looking into your suggestion about a floating input.

Thanks again
 
hi giggler,
Look at this pdf for 3V > 5V applications.

Paste it into URL box.

ww1.microchip.com/downloads/en/DeviceDoc/41285A.pdf
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top