|
 |
|
02-16-2006, 06:32 PM
|
#121
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Belgium
Posts: 325
|
Daily dumps : remote pin
Well, the news are rather good.
It seems the remote pin (#17) has the effect of activating/deactivating most CDC activities. Once it's not at 12V, the CDC doesn't send any frame nor any SPDIF output. I didn't check, but I'm pretty sure disk stops playing too.
The good news is that once pin 17 is back at 12V, the CDC starts sending frames again and the head unit allows you to switch back to CDC if you like without being turned off and on again.
Here's the operations log I did tonight :
(Head unit was previously turned off while playing from the CDC, then once it was off, I disconnected pin 17)
0 : Start capture
15 : Turn HU On (it immediately switches to radio)
30 : Attempt to change source to CDC (unsuccessful)
45 : Reconnect pin 17 to the HU's pin 17
60 : Attempt to change source to CDC (successful)
75 : Change source to radio
80 : Disconnect pin 17 from the HU's pin 17
105 : Attempt to change source to CDC (unsuccessful)
120 : Reconnect pin 17 to the HU's pin 17
135 : Attempt to change source to CDC (successful)
150 : Disconnect pin 17 from the HU's pin 17 while playing CD (music stops immediately. After a few seconds, the HU displays "LINK ERR" :-) but doesn't switch to another source now
165 : Reconnect pin 17 to the HU's pin 17 : music restarts where it stopped. Head Unit immediately displays the TR #/CD # again
180 : Turn HU off
(Note : there are again CRC errors in this file, but they only happen when pin 17 changes state, so I guess it's pretty normal, particularly seeing the spikes it probably generates)
Happy decoding :-)
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
02-16-2006, 07:47 PM
|
#122
|
|
Newbie
Join Date: Feb 2006
Location: Italy
Posts: 42
|
Quote: Originally Posted by Vicne
- the fact that CristianC could connect the pin directly to a PC. Indeed, at 1V/12V, the use of the MAX 232 is questionable for most recent PCs that have their threshold above 1V. I would like to hear the opinion of people used to serial communications (Ale again ?) about the removal of the MAX3232 altogether... Only for data coming from the PC probably would it be wiser to change levels I think (at least to avoid sending negative voltage to the CDC)
(*) in fact, the divider could probably be removed too.
I think that if the max3232 without the divider, receive data correctly, you can connect the HU to pc rs232 directly, becouse PC receiver probably is max232 or similar (I have found another EIA-232-D/V.28 driver/receiver MC145406 that has the same threshold: "The actual turn-on input switchpoint is typically biased at 1.8V above ground, and includes 800mV of hysteresis
for noise rejection. The nominal input impedance is 5k").
for the connection of Txd PC-HU i'll think for a simple schematic with a transistor or a cmos buffer...
good night!!
|
|
|
02-17-2006, 03:35 AM
|
#123
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Belgium
Posts: 325
|
Quote: Originally Posted by Ale
I think that if the max3232 without the divider, receive data correctly, you can connect the HU to pc rs232 directly, becouse PC receiver probably is max232 or similar (I have found another EIA-232-D/V.28 driver/receiver MC145406 that has the same threshold: "The actual turn-on input switchpoint is typically biased at 1.8V above ground, and includes 800mV of hysteresis
for noise rejection. The nominal input impedance is 5k").
And what do you think about the current drawn by that input impedance ? Is it "reasonable" to draw (in extreme case) 12V/3K = 4 mA from this signal, mainly from the point of view of the source (HU or CDC). From your experience, what would you consider the "absolutely safe maximum current" ? You see, I don't care if I fry one MAX232 or two, but I'd be really annoyed if the head unit went into smoke...
Quote:
for the connection of Txd PC-HU i'll think for a simple schematic with a transistor or a cmos buffer...
Yeah, I thought of a transistor too. I'd be happy to use one again :-)
Thanks for your help
Last edited by Vicne; 02-17-2006 at 04:09 AM.
|
|
|
02-17-2006, 06:16 AM
|
#124
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Belgium
Posts: 325
|
Message from CristianC
Hi all,
I had sent a PM to CristianC and he replied by email but allowed me to post his reply here. My main question was about how he got the hex dumps (which schema, which conditions, etc). Here's his message :
---
Hello
I have found the test board that I have used to conect HU to PC. This is the schematic (attached) but I think that your schematic is better.
Translation of my original message:
1. Start HU => HyperTerminal recieve: 3D 01 FE FD 3D 01 FE FD 3D 01 FE FD (hex code) => 3 connect attempts
2. If connect DATA-IN with DATA - OUT => HyperTerminal recieve: 3D 01 01 93 AE C5 => connected but HU waiting something to activate AUX input
I think that all emulation device can be made with a single chip. For example dsPIC30F5011 from Microchip.
This DSP has:
- high speed ADC convertor
- SP-DIF interface can be emulated in software (I think)
- UART port (can be configured as 9600 8-E-1)
---
|
|
|
02-17-2006, 06:26 AM
|
#125
|
|
Constant Bitrate
Join Date: Feb 2006
Posts: 113
|
Quote: Originally Posted by Ale
for the connection of Txd PC-HU i'll think for a simple schematic with a transistor or a cmos buffer...
good night!! 
I'd suggest to consider an extra line to connect the remote output of the hu to cts, so that the pc can check that the hu is on or off and start communication accordingly. (a pull down resistor should be enough if you don't want to get fancy).
|
|
|
02-17-2006, 06:37 AM
|
#126
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Belgium
Posts: 325
|
Quote: Originally Posted by pippolippi
I'd suggest to consider an extra line to connect the remote output of the hu to cts, so that the pc can check that the hu is on or off and start communication accordingly. (a pull down resistor should be enough if you don't want to get fancy).
Can we have a reliable communication without the CTS input and use it for another purpose ?
We could also send this remote to the ACC of the PC power supply (M1 ATX in my case) so that PC hibernates when HU stops and resumes when HU starts :-)
Note : if RTS/CTS aren't mandatory for handshaking, can I use the RTS output for another purpose too ?
|
|
|
02-17-2006, 06:51 AM
|
#127
|
|
Constant Bitrate
Join Date: Sep 2005
Location: Belgium
Posts: 172
|
As far as I know CTS/RTS and DCD/DTR are hardware handshaking signals but controlled by means of software. If you configure the serial port not to use hardware handshaking the signals are ignored and can be used for something else. You could try it, disconnect the bridges that you made on the RS232 connector and link it to your spy-circuit. Use Hyperterminal, switch of handshaking (hard and software) and see if data comes through, it should work. I say Hyperterminal because I have no idea how your MTTTY code is handling handshaking, in Hyperterminal you can switch it off, or any other terminal software that has this option of course.
|
|
|
02-17-2006, 08:02 AM
|
#128
|
|
Constant Bitrate
Join Date: Feb 2006
Posts: 113
|
Quote: Originally Posted by Vicne
Can we have a reliable communication without the CTS input and use it for another purpose ?
Of course you can, I do it all the time.
In windows you set the correct flags in DCB in a call to SetCommState, with synaser you call the config method passing false as hardflow (and softflow too, but that's another matter).
Quote:
We could also send this remote to the ACC of the PC power supply (M1 ATX in my case) so that PC hibernates when HU stops and resumes when HU starts :-)
Note : if RTS/CTS aren't mandatory for handshaking, can I use the RTS output for another purpose too ?
I think you can, though I never did that (in a project I'm using a serial port as a single digital input, but I don't use it for communication).
Windows api for writing the control lines is EscapeCommFunction and GetCommModemStatus for reading, synaser has the properties RTS and DTR (write only) and CTS,DSR (read only).
|
|
|
02-17-2006, 02:05 PM
|
#129
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Belgium
Posts: 325
|
Quote: Originally Posted by pippolippi
Of course you can, I do it all the time.
In windows you set the correct flags in DCB in a call to SetCommState, with synaser you call the config method passing false as hardflow (and softflow too, but that's another matter).
Windows api for writing the control lines is EscapeCommFunction and GetCommModemStatus for reading, synaser has the properties RTS and DTR (write only) and CTS,DSR (read only).
Cool. I never tried that. I'm asking because I'd like to switch my relays from CDC to PC only when the PC is booted and ready to fake the changer ;-)
|
|
|
02-17-2006, 02:54 PM
|
#130
|
|
Constant Bitrate
Join Date: Feb 2006
Posts: 113
|
Quote: Originally Posted by Vicne
Cool. I never tried that. I'm asking because I'd like to switch my relays from CDC to PC only when the PC is booted and ready to fake the changer ;-)
You could also use the parallel port: I'm using a circuit like the second one here (the one under "safer new design"), the only problem is that the data pins are active for a very short while when the pc is switched on/reset. It's not a problem in my application but it's going to be in yours. Maybe the serial port (or the parallel port in your motherboard) doesn't exhibit the same problem. You can check it with an oscilloscope or simply building the circuit and see if the relays energizes when turning on the pc. If it does you can add a delay circuit.
|
|
|
02-18-2006, 12:48 PM
|
#131
|
|
Newbie
Join Date: Feb 2006
Location: Italy
Posts: 42
|
emulator hw
Here my simple schematics using a cmos hex buffer non inverting hef4050, for now it's only theorical but we can test it...
I'll add some explaning text tomorrow becouse i'am late...
Last edited by Ale; 02-18-2006 at 12:57 PM.
|
|
|
02-19-2006, 08:58 AM
|
#132
|
|
Constant Bitrate
Join Date: Feb 2006
Posts: 113
|
Quote: Originally Posted by pippolippi
What I found interesting is that he connected the pc directly, with no interface.
I just tried that and it doesn't work
I connected just pins 15 (gnd) and 13 (edit: 14 actually, anyway I tried both) to the serial port and got nothing at all while switching on the HU. The led on the serial adapter (which indicates reception or transmission) stays forever lit. The serial adapter still works and I hope I didn't fry the HU.
In case anyone is interested, attached is the quick hack I wrote (in python) to test, but since the connection didn't work I couldn't really see if it works.
It needs a python interpreter (obviously) and pyserial.
(the forum doesn't accept .py files, so I added a .txt to the extension)
Last edited by pippolippi; 02-19-2006 at 10:04 AM.
|
|
|
02-19-2006, 11:54 AM
|
#133
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Belgium
Posts: 325
|
Quote: Originally Posted by pippolippi
I just tried that and it doesn't work
I connected just pins 15 (gnd) and 13 (edit: 14 actually, anyway I tried both) to the serial port and got nothing at all while switching on the HU. The led on the serial adapter (which indicates reception or transmission) stays forever lit. The serial adapter still works and I hope I didn't fry the HU.
Mmmh, my guess is that your serial port is less tolerant than his, and probably you're stuck on a "high" level.
However, what do you mean exactly by "serial adapter". Do you mean you have an external serial adapter ? I never saw a motherboard with an activity led for the serial port...
What you could try is either divide the voltage by the means of a resistor (like I did) or offset it down with one or two diodes in series.
Quote:
In case anyone is interested, attached is the quick hack I wrote (in python) to test, but since the connection didn't work I couldn't really see if it works.
It needs a python interpreter (obviously) and pyserial.
(the forum doesn't accept .py files, so I added a .txt to the extension)
For debugging purpose, don't hesitate to
use my MTTTY. It's not 100% stable, but it works rather well...
|
|
|
02-19-2006, 12:11 PM
|
#134
|
|
Constant Bitrate
Join Date: Feb 2006
Posts: 113
|
Quote: Originally Posted by Vicne
However, what do you mean exactly by "serial adapter". Do you mean you have an external serial adapter ?
Yes, an usb one (my laptop doesn't have an integrated serial port)
Quote:
What you could try is either divide the voltage by the means of a resistor (like I did) or offset it down with one or two diodes in series.
I thought about putting a divider (like CristianC), but until next weekend I don't think I'll have time to tinker with it  (edit: btw, I put a diode in the tx line, in order to avoid to inject negative voltages to the hu, but I didn't connect it. Oh, and since I don't have a blue mini iso connector I just used 2.8mm fastons with a little tape to avoid contact between adjacent pins  )
Quote:
For debugging purpose, don't hesitate to
use my MTTTY. It's not 100% stable, but it works rather well...
I don't have a cdc, so my little program is an attempt at an emulator. edit: and I doubt MTTTY would work under Linux
Last edited by pippolippi; 02-19-2006 at 12:26 PM.
|
|
|
02-19-2006, 12:35 PM
|
#135
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Belgium
Posts: 325
|
Quote: Originally Posted by Ale
I'll add some explaning text tomorrow becouse i'am late...
Let me try to do this as a homework and correct me if I'm wrong, OK ? :-)
1) On the HU Tx and Remote, you just put a pull-down resistor then a buffer, to increase input impedance compared to the direct serial port.
2) The buffers make sure that output levels are 0/12V. This is not RS232 compliant but should be RS232 compatible.
3) The PC TX is linked to a 5.1 kOhm resistor to the ground, presenting a 5K input impedance.
4) Same for the DTR, except that 3 buffers are wired in parallel to provide enough current for the relay, which has its freewheel diode.
5) The hex buffer chip is powered by the head unit, the resistor and 12V zener limit potential overvoltage to protect the IC, and the voltage is stabilised with 2 capacitors for both high and low frequency noise.
6) Grounds are linked together, and with the IC ground
Is that globally correct ?
A question : If the HU TX is terminated with a transistor and a pull-up resistor, don't you fear the 22k resistor will drag the voltage down too much ?
Last edited by Vicne; 02-20-2006 at 02:56 AM.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:13 PM.
| |