![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hey all, Great forum... I have a Mp3 player that has a 5v rs232 control port It comes with 1 controller, i want to make my own i got the protocol, and i wrote code for a atmel AVR that part all works, i want to interface it to the mp3 player the company told me, no problem, just wire the output of the uart in the AVR Open Collector to the mp3 players TX wire ok, i think i understand it... but can some one show me the drawing of the transistors I know i need two transisors, 1 will invert the uarts TX, then the second one will invert it back and provide open collector output also HIGH is the idle state of the line, so do i need to pull it high? in that case thats not exactly open collector is it? i need a Wired "or" solution thanks! mitch | |
| |
| | (permalink) | ||
| Quote:
Quote:
Anyway, for the open collector setup get a NPN transistor (bc546 or similar), connect it's base to the uart output trough a base resistor (10K should work), connect it's emmiter to ground and the collector is your open collector output | |||
| |
| | (permalink) |
| good point, i never noticed that on the max232 does that mean most microcontrollers output tx inverted? ok, then i guess any general purpose npn will do mitch | |
| |
| | (permalink) | |
| Quote:
If you program a software usart then you can use wichever polarity you want | ||
| |
| | (permalink) |
| i need to refrase... Im never going though a max... i have to connect the AVR TX line to 2 different microcontrollers on one of them, i see a vague schematic, where the TX line comes out of their micro and goes to a 1k ohm resistor then to the controll connector when i connect it to a max232, data comes in nicely in the pc, all bytes correct so i conclude its std uart output 5v=0, 0v =1, sound right? i guess thats what the atmel wants too the other one seems easy too... i connected tx to rx, and send some bytes, the device responded each device uses a different baud, but i only need to talk to one at a time i guess i could use some kind of mux but i figued, when im not talking to one, the other just gets garbage, and no harm done so how should i wire it, and keep the uarts protected.... mitch | |
| |
| | (permalink) |
| The device works with 5V signals? so does your atmel? and they both invert the data? just connect them straight togheter... | |
| |
| | (permalink) |
| I still don't really understand what you are trying to do?. From what I can gather you're wanting to feed two seperate 5V 'RS232' devices from one processor? - just use a seperate processor output pin to each, and use sofware UART's. | |
| |
| | (permalink) |
| i dont want to use sw uart unless i have to this avr is also processing SPI data and will be constantly processing uart rx and sending spi out mitch | |
| |