******************************************************************************** Description for "Car-PC" CDC Simulator ******************************************************************************** -------------------------------------------------------------------------------- Basic Schematic: -------------------------------------------------------------------------------- Atmel AT90S2313 +----+ +-----------------+ Vcc----| R1 |-----1|!Reset (SCK) PB7|19 +----+ | (MISO)PB6|18 | (MOSI)PB5|17 GND-----||--------+--------4|XTAL2 PB4|16 C1 | | | --- | (OCI) PB3|15 +-+X1 | | +-+ | | --- | | C2 | | | GND-----||--------+--------5|XTAL1 PB2|14 | (AIN1)PB1|13 +----+ Vcc--+----+-------20|VCC (AIN0)PB0|12 +-----| R2 |--CDC Data to HU | | +-10|GND | | +----+ C3--- ---C4 | | (ICP) PD6|11 | +----+ --- --- | | (T1) PD5| 9 | +--| R3 |--CDC Clock | | | | (T0) PD4| 8-+ | +----+ | | | | (INT1)PD3| 7----+ +----+ GND GND GND | (INT0)PD2| 6-------| R4 |--CDC Data from HU | (TXD) PD1| 3----+ +----+ | (RXD) PD0| 2-+ | +-----------------+ | +---------TX Data +------------RX Data R1: 10k C1: 27p R2: 330 C2: 27p R3: 330 C3: 47u R4: 330 C4: 100n X1: 7.3728MHz crystal Note that X1 MUST be a 7.3728MHz crystal, because the signal timing done by the SW is tuned to that frequency. -------------------------------------------------------------------------------- Signal description: -------------------------------------------------------------------------------- Vcc...............: Positive supply voltage for uC (typically 5V) GND...............: Ground CDC Data to HU....: Simulated CDC control signal to HU CDC Data from HU..: Command data from HU CDC Clock.........: CDC Clock RX Data...........: Serial data to control the CDC-Emu TX Data...........: Serial status data from the CDC-Emu -------------------------------------------------------------------------------- Connection to HU: -------------------------------------------------------------------------------- - Connection to HU is depending on the HU modell. - Pin assignment needs to be evaluated individually for each HU. - Some known assignments can be found on the following web page: http://home.tiscali.de/matthiasklumpp/CdcEmu/CdcEmu_Connection_e.html#2 - It must be assured, that the uC is powered synchronously with the HU's CDC-Power-Control-Pin (CDPC) ! That means that the uC must NOT be powered before the HU's CDPC goes high and also not too late. All asynchronous powering of the uC will end up in wrong initialisation of the HU, that afterwards will not behave correctly. -------------------------------------------------------------------------------- TXD Data Description: Communication CDC Emu -> external serial receiver (Car-PC Version) -------------------------------------------------------------------------------- Serial protocol parameters: 9600 Baud 8 Data Bits 1 Stop Bit no parity LSB first Voltage level on TXD pin: Vcc - On received HU commands, the CDC simulator is reacting in the corresponding way on the CDC control signal to the HU. - Additionally the CDC simulator is outputting a serial command on the TXD line. - Each serial command has two byte. - The following table shows the relation between serial output bytes and preceding HU activity: ------------------------------------------------------------------------------ Serial command Trigger event Byte 1 Byte2 Byte2 content (preceding HU activity) ------------------------------------------------------------------------------ 0x01 0xXX Track number BCD '<' key pressed 0x02 0xXX Track number BCD '>' key pressed 0x03 0xXX Track number BCD '<<' key pressed 0x04 0xXX Track number BCD '>>' key pressed 0x05 0xXX CD number 1-6 'CD1..6' pressed (CD change) 0x10 0x00 none CDC requested to PAUSE 0x20 0x00 none CDC requested to PLAY 0x30 0x00 none CDC requested to STOP 0x40 0x00 none CDC requested to re-start (new init) 0x50 0xXX Track number BCD CDC requested to SCAN tracks 0x50 0xFF End Scan Indication CDC requested to stop scanning tracks ------------------------------------------------------------------------------ Example: If the simulator sends 0x02 0x13, the '>' key was pressed and track 13 was selected. - Please note, that depending on the HU model, more than one of these codes might be emitted in sequence by the CDC simulator. -------------------------------------------------------------------------------- RXD/TXD Data Description (only available for SW > V2.3.12): Communication external serial transmitter/receiver (Car-PC Version) <-> CDC Emu -------------------------------------------------------------------------------- Serial protocol parameters: 9600 Baud 8 Data Bits 1 Stop Bit no parity LSB first Voltage level on RXD pin: Vcc - There are several services that can be triggered from externals via a serial command sent to the RXD line of the CDC simulator. - The CDC simulator is responding on the TXD line in the way described below. - Each serial command has two byte (1st is requested service, 2nd is data). - The following table shows the relation between serial request, action and response by the simulator: ----------------------------------------------------------------------------- Serial command -> Serial response Byte1 Byte2 Byte1 Byte2 (RXD) (RXD) (TXD) (TXD) Action ----------------------------------------------------------------------------- 0xFD 0xXX 0xFD 0xXX 0xXX is the CD number (BCD) to be updated on the radio display 0xFC 0xXX 0xFC 0xXX 0xXX is the track number (BCD) to be updated on the radio display 0xFB 0xXX 0xFB 0xXX 0xXX is the minute time stamp (BCD) to be updated on the radio display 0xFA 0xXX 0xFA 0xXX 0xXX is the second time stamp (BCD) to be updated on the radio display ----------------------------------------------------------------------------- Example: Sending 0xFC 0x13 to the simulator, will change the radio display to show 'TRACK 13' and the simulator bounces back 0xFC 0x13 on its TXD line. - Please note, that this feature is not working with all radios. Some radios (VW MCD/MFD) just display any kind of data w/o doing a check weather the data is valid or not. Other radios will do a plausibility check. That means they will check, if a corresponding key press happened before. If not, they simply will exit the CDC mode. If your radio behaves like that, you will not be able to change the displayed values from outside, but only by pressing the radio keys.