Opel TID Display

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

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 CodeTidy.com is for sale | HugeDomains. 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:

// 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:

#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?

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.

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'll check everyting once my Arduino arrives, and then I'll report back here.

Hello everyone, newbie here.

After three days of headache and frustration (great way to spend the holidays :astonished:) i came up with some working arduino code to drive my TID

mind you, i can't write a proper library of functions because... i don't know how :sweat_smile:

so here it is an arduino project that just writes the letter G on the third position of a 8 letters display, needs additional work to make it actually useful, but it's a good start i think.

Hats off to you. But I can see you haven't used Arduino's I2C lib. Now, I have a question about parity: is that a part of standard I2C protocol? I mean, can I just ditch those lines of code and use Wire library? I have to ask because I can't try this as my Arduino hasn't arrived yet.

I have tried arduino wire library as well as two other i2c libraries (one being the base upon i created the sketch above), but none of those worked for this display, so i think parity is not part of the i2c protocol

I was really hoping we could use Wire library, it would be so much simpler. Well, never mind, I'll at least learn how to make libraries, if someone doesn't do that before me.

uhm, making a library out of it wasn't as hard as i thought, so here it is:

Opel TID arduino library 1.0

the public functions are slightly smarter than the basic one i wrote yesterday, so now you can write directly a message, and if it's longer than 8 chars it will roll, and you can selectively toggle every symbol, clear only the text/symbols while leaving the other untouched

Good job Giovanni83, nicely done. Now I can't wait my Arduino to arrive. I plan to modify MPGuino to display data on stock display in my Astra instead of 16x2 originally used in the project.

http://ecomodder.com/wiki/index.php/MPGuino

added a couple of functions, like the bargraph and the ability to write/delete only a substring of characters

opelTiD 1.1

@bobale
cool project. In fact i did this library to use my corsa display with the OBDuino

I've actually bought Arduino solely because of OBDuino (already have TI Launchpad, and it was enough for my needs). I really appreciate your effort to adapt existing code to work with Arduino.

Offtopic: which Corsa do you have? :slight_smile:

Offtopic: which Corsa do you have?

an old corsa b 1.0 that keeps hangin on

It's not powerful, but at least it likes to rev, and that 3-cylinder configuration gives it a nice sound.

God, I can't wait for my Arduino to arrive, I really want to make this TID+MPGuino thing work.

Thanks for posting, I was looking at doing some mods to my MKIV (G) Astra and came across this.

Will this work for a mega adk?

However the Haynes Manual (UK service book maker) Has the pins as 9, 10,11, (8?) and 12 as (as previously noted) the road speed signal but the Haynes diagram is for the Multi display (I am a TID user swell!).

I haven't had my TID out since a painted my dash so I have a question.

Does the MID & TID have the same connector and pin count?

Also how hard would it be to also used an OLED display (Adafruit unit) with the TID?

No, TID and MID don't have same pinout. Even connector is different. Road speed can be picked up somewhere near instument panel/speedo.

Does the MID & TID have the same connector and pin count?

i don't know about the MID, but if you need the pinout for the TID here is a good link:
TID page

Will this work for a mega adk?

i tested it with an old mega board and compiled for arduino 1.x, i can't think of any reason why it shouldn't work with the adk

Giovanni83:
i tested it with an old mega board and compiled for arduino 1.x, i can't think of any reason why it shouldn't work with the adk

I'm glad you said that as i'm using a maga adk and 1.+ process.

Thanks,just need to get a spare display to play with.

Your link doesn't work.

Your link doesn't work.

sorry, fixed.

Can you post Pictures of your setup and connections please?