Opel TID Display

Adding cycle() hat line 140 works

that's good news :slight_smile:

Scrolling is a bit bumby, sometimes the text gets stuck for one unit, then the letters are shifted for two positions. Example?
"SCROLLING " is displayed as "SCROLLIN", next one is "ROLLING "

different rolling speeds yelds different results?

Different rolling speeds dont solve the bumpes. The slower it scrolls, the fewer the bumps appear.

Any ideas about the 10 Letters TID?

gorgeous:
Any ideas about the 10 Letters TID?

none, sorry.

as for the issue with nano, i can breadboard the circuitry, since i have an atmega328 in dip28 package, and make some more test; hopefully i'll get some results.

Something new to report.
Using TID8 works fine, TID10 not. I have added some serial communication to observe the calls of the function. I am using this code:

void loop () {
  start = millis();
  start_tid();
  tid_address(0x9B);  //this is the address for the 8 letters, for the 10 use 0x9B instead
  tid_data(0);  //first symbols byte
  tid_data(0);  //second  symbols byte
  tid_data(0);
  
  tid_data('C');    //first letter
  tid_data('o');
  tid_data('r');
  tid_data('s');
  tid_data('a');
  tid_data(0);
  tid_data('C');
  tid_data(0);    //8th letter
  tid_data(0);
  tid_data(0);
  stop_tid();   
  
  end = millis();
  time = end - start;
  Serial.println(time);
}

Using this (with eight letters) with the TID8 gives about 50ms of duration, which works fine, the text is beeing displayed. With the TID10 it takes about 60ms, but the text appears only sporadical. I dont have any clue why or how to solve this.
I have no idea, what I can do further.

FINALLY, IT WORKS!

I took a closer look at the procotoll specified here:

I implemented the mentioned timings, and ended up with the following code:

#define tid_delay 150  //this is a working timing value, if you change this, TID can stop working 180
#define delay_300 150
#define delay_100 100

void tid_byte(byte data) {
  pinMode(scl, OUTPUT);
    for (uint8_t m = 0X80; m != 0; m >>= 1) { //2 lines from
    digitalWrite(sda, m & data);              //William Greiman's I2cMaster Library
    delayMicroseconds(5);
    digitalWrite(scl, HIGH);
    delayMicroseconds(50);
    digitalWrite(scl, LOW);
    delayMicroseconds(50);
    }
  delayMicroseconds(delay_300);
  pinMode(sda,INPUT);     //3
  delayMicroseconds(tid_delay);
  pinMode(scl,INPUT);     //4
  delayMicroseconds(delay_100);
  while(digitalRead(scl)==0);   //6
  delayMicroseconds(delay_300);
  pinMode(scl,OUTPUT);
  digitalWrite(scl, LOW);   //7
  while(digitalRead(sda)==0);   //8
  pinMode(sda,OUTPUT);
  }

void start_tid() {
  pinMode(sda,INPUT);
  digitalWrite(mrq, LOW);
  delayMicroseconds(100);
  while(digitalRead(sda)==1);
  digitalWrite(mrq, HIGH);
  delayMicroseconds(100);
  while(digitalRead(sda)==0);
  pinMode(sda,OUTPUT);
  pinMode(scl,OUTPUT);
  digitalWrite(sda, LOW);
  delayMicroseconds(100);
  digitalWrite(scl, LOW);
  delayMicroseconds(100);
  }
  
void stop_tid() {
  digitalWrite(sda, LOW);
  delayMicroseconds(100);
  digitalWrite(mrq, HIGH);
  delayMicroseconds(500);
  digitalWrite(scl, HIGH);
  delayMicroseconds(100);
  digitalWrite(sda, HIGH);
  delayMicroseconds(100);
  }

Now I can display any text I want :smiley:

Great job! i remember trying the values shown in carluccio's page on the tid but i was having trouble, probably i was just making some mistake :sweat_smile:

does the text scrolls fine on the tid8 with the arduino nano now?

Let me just say: EVERYTHING works.
The TID8 was already working (after adding a cycle() mentioned earlyer). But the TID10 wasn't working at all, text appeared only sporadical, and only for half a second. After using the shorter timings, EVERYTHING works with the TID10. For me, scrolling on TID10 needs a speed of '2'.

Tested just one minute ago: the TID8 doesnt work with the new timings. Seems to be too fast for the old display.

finally i managed to work a bit again on this library, now seems to work fine on ATMEGA328p

to recap a bit:

works ONLY with 8 characters display
improved timings
reworked functions (now you can define three different independent spaces)

refer to TID12.h for a more detailed explanation

grab it here

Hello,

I would like to bring this thread up again.
As I got into Arduino recently, and would like to build a custom Opel TiD.

  • First of all:
    Is there any working "method" / library to send text and symbols to the Display? Additionaly I would like to have something like a "example" code, which sends a simple "Hello world" to the display, to have something which I can begin learn with.

  • Is there any "character table"? Is it possible to send only pre-defined characters and symbols, or it is possible to enable only single segments in order to "build" your own symbols?

  • Is it possible to set up the TiD´s clock via Arduino? I am unsure if the TID get its time from the radio in case its connected, but in case its true, then there should be a method to forward received time from GPS/DCF to the TID´s clock.

I got some other ideas what could be else implemented in this, I am a beginner though so I will have first to learn the basics I think.

Hi Anon

Is there any working "method" / library to send text and symbols to the Display? Additionaly I would like to have something like a "example" code, which sends a simple "Hello world" to the display, to have something which I can begin learn with.

if your TID looks like this (well, minus the color) then you can find a working library in the post just above yours. In the library header there is a brief description of how methods works, but if you need help, just ask here.

Is there any "character table"? Is it possible to send only pre-defined characters and symbols, or it is possible to enable only single segments in order to "build" your own symbols?

As far as i could understand, you can only display letters (uppercase), numbers and few symbols (like + - . *). That being said, maybe some lower level communication could allow doing what you ask, but i don't have any information on the subject.

Is it possible to set up the TiD´s clock via Arduino? I am unsure if the TID get its time from the radio in case its connected, but in case its true, then there should be a method to forward received time from GPS/DCF to the TID´s clock.

Again, not that i know. The clock is run by a separate section, so the tid displays either the clock or what's incoming from the communication line, and wich one is selected by the voltage on a specific pin. Then again, the tid seems to store fault codes from the ecu, so there is probably more happening "under the hood", but i don't know how to access it.

Then again, the tid seems to store fault codes from the ecu, so there is probably more happening "under the hood", but i don't know how to access it.

These Faultcodes are only TID relevant.
As far as I understand from the schematics, there happens only a "Communication" over these wires.

9 SCL
10 MRQ
11 SDA

the rest of them are only "Powersupply" and wires to the "Temperature" sensor. As far as we know, the 9 - 10 - 11 are connected to the Opel radio.

When you remove the radio (as I did) then there appear a faultcode in the TID if you press the two buttons simultaneously.
I don´t recall the Faultcode number, I can look up it later.

The second Code which appeared when I removed the whole TID from the car, and connected it only to a 12 V supply was something like F171
this means a problem with the temperature sensor.

So I don´t think that there is any connection to the ECU, considering the fact that I can read out the faultcodes with my laptop and can confirm that no faultcodes were stored in my ECU at the time the TID diplayed them.

As far as i could understand, you can only display letters (uppercase), numbers and few symbols (like + - . *). That being said, maybe some lower level communication could allow doing what you ask, but i don't have any information on the subject.

But You have to tell the TID what char to display? How do you send a command to display "ABC" for example?
I mean on low-level.

After reading the PDF here: Opel TID – Dario's Home
I couldn´t find any hints, which bits or bytes send to the TID stands for which character.
So how did You determine them?

In the library header there is a brief description of how methods works, but if you need help, just ask here.

Well to understand the C language to its full detail is still a little hard for me. :smiley: But I will try.

Well to understand the C language to its full detail is still a little hard for me. smiley-grin But I will try.

what, in terms of coding capabilities, you need to display a message on your TID (again, if is the 8 carachters kind) is far from being a deep knowlege of the c language.

the following example displays the message "ABC" on the tid

#include <TID12.h>
TID MyTid(7,5,6);

void setup() {
MyTid.space1_init(0,7);
}

void loop() {
    MyTid.display_message("ABC",1,1);
}

if you have any question regarding this library i would be happy to help

Thx for the code, I will try it out. And yes I have a 8-char TID

But what I meant, is how do you exactly convert the "ABC" to the "TID-Signal"

But what I meant, is how do you exactly convert the "ABC" to the "TID-Signal"

basically, the ASCII number corresponding to the carachter is sent to the display in serial fashion. The uppercase A, for example, corresponds to binary 1000001, so this number is sent to the tid, using serial communication with a specific protocol. In the carluccio page you linked before are specified all the timings and rules you need to follow in order to succesfully transmit data. Obviously a detailed explanation would be a bit longer, but the purpose of the library is to avoid users having to deal with all of this :slight_smile:

Giovanni83:

But what I meant, is how do you exactly convert the "ABC" to the "TID-Signal"

basically, the ASCII number corresponding to the carachter is sent to the display in serial fashion. The uppercase A, for example, corresponds to binary 1000001, so this number is sent to the tid, using serial communication with a specific protocol. In the carluccio page you linked before are specified all the timings and rules you need to follow in order to succesfully transmit data. Obviously a detailed explanation would be a bit longer, but the purpose of the library is to avoid users having to deal with all of this :slight_smile:

Well it worked .. at least a bit.

I could send a simple text to the TID. with

#include <TID12.h>
TID MyTid(7,5,6);

void setup() {
MyTid.space1_init(0,7);
}

void loop() {
    MyTid.display_message("12345678",1,1);
}

Although its not dynamic but static Text, there is already a problem. Every minute (when the clock on the TID counts a new minute) the display clears for 0,5-1 sec.

Nevermind when I try out two different strings for example:

MyTid.display_message("12345678",1,1);
delay(500);
MyTid.display_message("87654321",1,1);
delay(500);

It works somehow, but the timing is anything but accurate XD

I mean instead of this pattern: ------------------------------
Its something like this: ------------------------_------

I tried to remove the delays to add another delays, to raise this speed value (X) in "MyTid.display_message("87654321",X,1);"
But no success.

Additionally I would like to try the following to have some dynamic output to send to the TID like if I would want to display the engines "RPM" or something. Smooth and fast refresh rate is very important.....:

#include <TID12.h>
TID MyTid(7,5,6);

void setup() {

MyTid.space1_init(0,7);

}

void loop() {
  int i = 0;
  for(i=0;i<1000;i++)
  {
  MyTid.display_message(i,1,1);
  delay(500);
  }
}

it says.

sketch_may12a.ino: In function 'void loop()':
sketch_may12a:14: error: invalid conversion from 'int' to 'const char*'
sketch_may12a:14: error: initializing argument 1 of 'String::String(const char*)'

Although its not dynamic but static Text, there is already a problem. Every minute (when the clock on the TID counts a new minute) the display clears for 0,5-1 sec.

not sure if there is a way to inibith that, but happens on mine and other's too. Can't remember if someone already posted why it happens and how to avoid that.

it works somehow, but the timing is anything but accurate smiley-lol

I mean instead of this pattern: ------------------------------
Its something like this: ------------------------_------

try with the following code:

MyTid.clear_space(1);
MyTid.display_message("12345678",1,1);
delay(500);
MyTid.clear_space(1);
MyTid.display_message("87654321",1,1);
delay(500);

it says.

Code:

sketch_may12a.ino: In function 'void loop()':
sketch_may12a:14: error: invalid conversion from 'int' to 'const char*'
sketch_may12a:14: error: initializing argument 1 of 'String::String(const char*)'

just remember that the display_message method (or was it called function? :blush:) requires a string argument. I'm shure there are lighter and more elegant ways to do this, but i would just do this:

MyTid.display_message(String(i),1,1);

a final note: don't expect crazy refresh rates from this display. I am shure that the library itself could be improved a lot by a good programmer (which certainly i am not :sweat_smile:) but in the end the timings of the tid need to be respected for everything to work.

To get more speed, you can try tweaking a parameter in the TID12.h header

#define tid_delay 25

seems to me that with 25 everything works fine even on the atmega328 and the speed is reasonable, but you can try and reduce it.

Well its a bit better but something like this

would still be impossible.

I don´t know, today when I ´ve connected the arduino (which is on an experimental board along with the TID wiring) I got an "unknown device".

When I´ve disconnected the 12 V powersupply adapter for the TID which is on a common GND with the arduino. The arduino was recognized correctly.

Maybe there is an interference. Between the powersupply and arduino. (Arduino get its powersupply from the USB port and the TID is connected to a separate circuit only the TID´s GND (and of course the SCL/SDA/MRQ) is connected to the Arduino)

btw

works fine even on the atmega328

why "even" on the "atmega328" what´s bad about it? Are there better alternatives?

why "even" on the "atmega328" what´s bad about it? Are there better alternatives?

nothing bad about it, but initially i developed the library on arduino mega (atmega1280), then when i tried it on the atmega328 was sluggish, so i reworked the code.

btw, to make the text scroll like in the video you posted, you just have to write a string longer than the space, and for the meter using all the symbols use the bargraph function

#include <TID12.h>
TID MyTid(7,5,6);
int i=0;
void setup() {
MyTid.space1_init(0,7);
}

void loop() {
   i++;
   if (i>255) i=0;
   MyTid.display_message("THIS STRING IS UNNECESSARILY LONG. NOW IT'S EVEN LONGER  ",30,1);
   MyTid.bargraph(i);
}

you can also write up to 3 different strings, each one rolling at a different speed

#include <TID12.h>
TID MyTid(7,5,6);

void setup() {
MyTid.space1_init(0,2);
MyTid.space2_init(3,5);
MyTid.space3_init(6,7);
}

void loop() {
    MyTid.display_message("ABCD ",5,1);
 MyTid.display_message("1234 ",15,2);
 MyTid.display_message("MNO",30,3);
}

also, from the description your circuit seems fine, just double check that there are no bad connections or short circuits

Yes the first one seems to work pretty well.

Maybe I just don´t get the concept of "C".

But Anyway I used this one

#include <TID12.h>
TID MyTid(7,5,6);
int i=0;
void setup() {
MyTid.space1_init(0,7);
Serial.begin(9600);
}

void loop() {
   delay(200);   
   i++;
   if (i>255) i=0;
   MyTid.display_message(String(i),30,1);
   MyTid.bargraph(i);
   Serial.println(i);
}

To be able to compare the serial output with the actual output of the TID
But there are many glitches, or numbers left out. I will upload a video of it soon if it helps.

Btw I am using the Arduino Nano, if I didn´t mentioned it before.

If I understood it correctly the "30" in " MyTid.display_message(String(i),30,1);" is the scrolling speed, although its not necessary when the string is max 8 chars long. But if I set it to "1" in this "dynamic" case its much more buggy then. Even if there is no scrolling just a updating number.

So I don´t understand what happens when you add a "delay(X)" in your Loop function, and if it affect or even is a conflict between this two values.

Let´s take this as an example:

#include <TID12.h>
TID MyTid(7,5,6);
int i=0;
void setup() {
MyTid.space1_init(0,7);
}

void loop() {
   i++;
   if (i>255) i=0;
   MyTid.display_message("THIS STRING IS UNNECESSARILY LONG. NOW IT'S EVEN LONGER  ",30,1);
   MyTid.bargraph(i);
}

It´s pretty fast scrolling text, so when I put a delay in it, it should reduce the scrolling speed then or not?

So is this "30" equal to a "delay(30)" so the program stucks in the "display_message" function for 30ms, before it continues?

Or does the "loop()" function go on nevermind whatever happens in "display_message()"?