Pages: 1 ... 3 4 [5] 6 7   Go Down
Author Topic: Opel TID Display  (Read 23055 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Back in town with some news. I've got a new power supply, and I bought an 8 Letters TID from an Astra F. I switched back to Basic_Functions.ino, which worked pretty good, I can display any text up to eight Letters on this TID. Using the library doesnt work properly. Displaying a short text results in flickering the display, 1 second text, 1 second empty, and so on. I cant judge the scrolling, there is scrolling something, but there is the same flickering. A speed of '4' seems to be the right for me, with 128 the TID isnt quick enough to display letters readable.

Now using my 10 Letters TID: with Basic_Functions.ino, text ist beeing displayed for 4 seconds, 62 seconds blank, 4 seconds text, and after further 75 seconds I gave up waiting. The library isnt working at all.

Quote
I didn't mention in the PDF that the arrow J> is the Red/White connector ('gorgeous' put red/grey) that tells the display to display the date or the text string. This wire is just the antenna-power wire given out by the radio that is meant for electric aerials, which tells them to rise or drop when the radio is switched on/off.
My radio always powers this pin, regardless of radio or not, TP or not. In my car, the Pin 5 in the ISO is connected to the antenna amplifier and also to the red/white wire to the TID. Cutting the red/white wire lets the TID always display the date. Cutting the thicker wire on the radio disables the antenna amplifier.

I have made another discovery. Inbetween stop_tid() and start_tid(), a delay of maximum 30ms is allowed, otherwise the display clears the screen. I am using some code like this
Code:
    char light[12];
for ( int i = 0; i < 70; i++ )
    {
        start_tid();
        tid_address(0x94);
        tid_data(0);
        tid_data(0);
        //tid_data(0);            // delete if 8 Letters

        //tid_data(light[1]);     // delete if 8 Letters
        tid_data(light[2]);
        tid_data(light[3]);
        tid_data(light[4]);
        tid_data(light[5]);
        tid_data(light[6]);
        tid_data(light[7]);
        tid_data(light[8]);
        tid_data(light[9]);
        //tid_data(light[10]);    // delete if 8 Letters

        stop_tid();

        */delay(30)
a delay of 30ms works at the 8 Letter TID, more than 30ms not.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i'm curious about the 8 letters astra F display, could you please post the connections scheme used and the sketch you wrote using the library (wich version btw?)?

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

TID 1.1 from page 2

Connection on the 8 Letters TID:
1: 12V (permanent)
3: GND
5: 12V (switched)
8: 12V (Auto Antenna)
9: SCL
10: SDA
11: MRQ

Sketch:
Code:
#include <TID.h>

TID myTID (7,5,6);//SDA, SCL, MRQ

void setup()
{
}

void loop()
{
  myTID.display_message("CORSA C",4);
}

Using a scroll speed of 64 stopps the flickering and displays a short text permanently, but leaves the scrolling completely unusable.

---

BTW, the connection of the 10 Letters TID:
1: 12V (switched)
2: 12V (Auto Antenna)
3: 12V (permanent)
6: GND
10: SCL
11: SDA
12: MRQ
« Last Edit: May 17, 2013, 02:17:13 pm by gorgeous » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i never noticed this 30ms issue between stop and new start, but since i am using a mega maybe this never came up.
perhaps the issue can be traced to the display_sub_message function in tid.cpp

Code:
void TID::display_sub_message(String message, byte roll_speed,byte start,byte stop) {

int upd_delay = 1000 / roll_speed;
if ((millis() - _timestamp) > upd_delay) {

for (int i=start; i<=min(stop,(start-1+message.length())) ; i++) {
_ad = i + (_incr * (message.length()>(stop-start+1))) - start;
if (_ad >= message.length()) {
_ad = _ad-message.length();
};
_display[i] = message.charAt(_ad);
};
if (message.length()>(stop-start+1)) {
_incr++;
};
if (_incr >= message.length()) {
_incr=0;
};

cycle();
_timestamp = millis();
};

}


 adding a cycle() call at the very beginning of it could prevent exceeding the 30ms max between start and stop, without making the text scroll too fast. Could you please tell me what happens if you add the text

cycle();

at line 140 of TID.cpp, save the file and recompile, reload the sketch you posted above?


by the way, what happens when pin 5 is switched from +12 to gnd? (on my setup, +12v on pin5 makes all charachters disappear from the display)


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Adding cycle() hat line 140 works. 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 "

I have added a cycle in the library for the 10 Letters TID, but nothing is happening on the TID10

Disconneting Pin 5 on the TID8 doesnt change anything. Disconnecting also Pin8 switches the TID8 off. And connecting only Pin 5 lets the TID8 display the date.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Adding cycle() hat line 140 works

that's good news  smiley

Quote
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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Any ideas about the 10 Letters TID?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

FINALLY, IT WORKS!

I took a closer look at the procotoll specified here:
http://wiki.carluccio.de/images/7/7a/Tid-protokoll.pdf

I implemented the mentioned timings, and ended up with the following code:
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-grin
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-sweat


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

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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'.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 1
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: 1 ... 3 4 [5] 6 7   Go Up
Jump to: