Go Down

Topic: Opel TID Display (Read 27 times) previous topic - next topic

tuccer

Thanx for your help!
So the TID ( Triple Info Display) display is a stock part in the Opel cars ( in my case the Astra F) and its made for the stock radio to show the radio data and the time with the temperature. The radio has no built in display and its connected with some wire to the TID. Because i don't have the original radio, and i want to use the screen. 
The screen :

It is the Corsa TID but mine is the same.
The problem is that this communication is not clean I2C, because i have an MRQ pin and it is must be use to start and stop the transmit. If  you see my links the german will explain the complete protocol. 

I find some BASCOM codes but i totally don't know the Bascom Basic.

And of curse where i find the code there was no wireing diagrams or any explanations.
So lets play puzzle :D or rewrite the code in arduino language. I test the code with the Arduino IDE and i's can complie so it is can be use with the arduino.

-thanks in advance and sorry for my english, i am a Hungarian guy.

Budd

Hey Tuccer, Have you already succeeded in connecting the TID? And where did you find the code? Maybe there is a newer improved version?

bobale

#7
Dec 23, 2012, 04:38 am Last Edit: Dec 23, 2012, 05:18 am by bobale Reason: 1
Has anyone had any success interfacing Arduino with Opel TID display? I've found many, many codes in different programming languages, but I'm not advanced enough to translate them into code which will work with Arduino.

I know that asking someone to translate code would be too much to ask, but is there any way someone could help a little here? As the code is too long to share in one post, here is the complete code http://codetidy.com/4239/. A chunk of code is dedicated for voltage measurement and display, and I'm not interested in it, so I don't need that.

Mostly, I'm confused about these initializations:

Code: [Select]
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
TCCR0=0x00;
TCNT0=0x00;

// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer1 Stopped
// Mode: Normal top=0xFFFF
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;

// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer2 Stopped
// Mode: Normal top=0xFF
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;

// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
MCUCR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;

// USART initialization
// USART disabled
UCSRB=0x00;

// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;

// ADC initialization
// ADC Clock frequency: 250,000 kHz
// ADC Voltage Reference: AVCC pin
ADMUX=ADC_VREF_TYPE & 0xff;
ADCSRA=0x85;

// SPI initialization
// SPI disabled
SPCR=0x00;

// TWI initialization
// TWI disabled
TWCR=0x00;


Do I need any of these initializations for this code to work in Arduino?

Edit:
I've found Arduino code that looks like it shoud work, but as my Arduino hasn't yet arrived, I have no way of checking it:

Code: [Select]
#include <Wire.h>
void setup() {
  pinMode(2, OUTPUT);
 Wire.begin();

digitalWrite(2, LOW);
delay(200);
digitalWrite(2, HIGH);
delay(200);
Wire.beginTransmission(0x94);
digitalWrite(2, LOW);
Wire.write(0x10);
Wire.write(0x01);
Wire.write(0x8C);
Wire.write(0xA4);
Wire.write(0x8A);
Wire.write(0x8A);
Wire.write(0xB5);
Wire.write(0x40);
Wire.write(0x8C);
Wire.write(0x9B);
digitalWrite(2, HIGH);
Wire.endTransmission();
}

void loop() {}  


It seems that this code follows procedure for sending text to the LCD:
1:Idle state all lines are high.
2:Pull MRQ low for a short period and let it go high again.
3:Send a "I2C Start"
4:Send the address byte, 0x94
5:Pull MRQ low.
6:Send 13 data bytes. (The 8 character display uses 10 databytes)
7:Let MRQ go high
8:Send "I2C Stop"

What do you guys think?

MarkT

Quote

I think the transistors can work with the arduino but i have to connect one PNP and one NPN to each other for controlling the SDA, SCL and MRQ lines. Is it right?


No, I2C is an open-collector bus, PNP pull-up transistors would stop it working.

Quote

Do I need any of these initializations for this code to work in Arduino?

No, the Arduino software does its own initialization.

The code you found is assuming particular pins for each of the three pins, namely:
MRQ  - pin 12   (port B, bit 4)
SCL - pin A5   (standard hardware SCL pin, port C bit 5)
SDA - pin A4  (standard hardware SDA pin, port C bit 4).

To pull MRQ low for instance the MRQ_low() routine sets pin 12 to HIGH, since pin 12 turns on the NPN transistor
(the collector of which thus pulls MRQ low).


[ all port/pin numbers apply to Uno (ATmega328 chip) ]
[ I won't respond to messages, use the forum please ]

bobale

I'll check everyting once my Arduino arrives, and then I'll report back here.

Go Up