--- In AVR-Chat@yahoogroups.com, "Bob Gardner" <bob.linda.gardner@...> wrote: > ... I don't want to cut corners. Then there's one more trick that might be worth bringing up. All the level converter ICs mentioned will work great, but you probably don't have them in your spares drawer. For two connections at fairly low speed (I'm still assuming you're using the UARTS) you will also be able to use a couple of transistors in common-base configuration as level converters. Any old NPN small signal transistors will do, such as the 2N3904. Pull the base up to VCC on the driving side with a fairly high value resistor. Connect the driving port bit to the emitter. Pull the collector up to VCC on the driven side with a medium value resistor and connect it to the driven port bit. Without doing the math, I would try something like 4.7 kohms on the collector and 47 kohms on the base, but anything in this area should work. When the driving output is higher than the base resistor, the transistor is off and the collector resistor pulls the driven input up. When the driving output goes low, the transistor turns on and pulls the driven input down to about 0.2 V above the driving output voltage. You lose a small amount of noise margin, but in many projects this is of little consequence and the big advantage is you can often pull this trick with parts on hand. Graham.
Message
Re: Mega324p port info
2008-04-30 by Graham Davies
Attachments
- No local attachments were found for this message.