Nächstes Thema anzeigen
Vorheriges Thema anzeigen

Vorheriges Thema anzeigenDieses Thema verschickenZeige Benutzer, die dieses Thema gesehen habenDieses Thema als Datei sichernPrintable versionEinloggen, um private Nachrichten zu lesenNächstes Thema anzeigen
Du musst dich anmelden um Beiträge zu schreiben!Du musst dich anmelden um Beiträge zu schreiben!
Autor Nachricht
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: So 04 Dez, 2011 20:37  Titel:  (Kein Titel)
Nach untenNach oben

@W201:
Ohne das "Navi plus" wirst du keine Navipfeile im FIS mehr haben, weil dein CarPC vermutlich weder 3-Leiter-Bus noch CAN-Bus hat.
Das gleiche gilt für die Radiosender-Anzeige. Da ließe sich aber eventuell noch was basteln, da man dem FIS-Control die Radiosender auch per serieller Schnittstelle schicken kann.



    
W201
Frischfleisch
Frischfleisch


Alter: 48
Anmeldung: 03.04.2011
Beiträge: 16



BeitragVerfasst: So 04 Dez, 2011 21:16  Titel:  (Kein Titel)
Nach untenNach oben

ZZottel hat folgendes geschrieben:
@W201:
Ohne das "Navi plus" wirst du keine Navipfeile im FIS mehr haben, weil dein CarPC vermutlich weder 3-Leiter-Bus noch CAN-Bus hat.

Woher weißt du das??

Hallo,

@ZZottel,

in meinem Beitrag oben habe ich doch schon erwähnt das ich TMC usw.habe.
Mein Fahrzeug ist von 2002 und hat CAN-BUS.

Mfg



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: So 04 Dez, 2011 21:28  Titel:  (Kein Titel)
Nach untenNach oben

@W201:
Ich hatte dich so verstanden, dass du das "Navi plus" durch einen CarPC ersetzen willst. Bisher sendet das "Navi plus" die Abbiegepfeile an das FIS-Display.



    
W201
Frischfleisch
Frischfleisch


Alter: 48
Anmeldung: 03.04.2011
Beiträge: 16



BeitragVerfasst: So 04 Dez, 2011 21:45  Titel:  (Kein Titel)
Nach untenNach oben

ZZottel hat folgendes geschrieben:
@W201:
Ich hatte dich so verstanden, dass du das "Navi plus" durch einen CarPC ersetzen willst. Bisher sendet das "Navi plus" die Abbiegepfeile an das FIS-Display.


Hallo,

@ZZottel,

doch du hast richtig verstanden.
Ich möchte das NaviPlus austauschen gegen einen CarPC.
Und würde dein FIS-CONTROL evtl.kaufen.
Meine Frage war eigentlich,ob man mit dem FIS-CONTROL die Pfeile,FIS,Lenkradbedienung,CDtracks und die Radioanzeige beibehalten könnte.
Und dazu noch einige MWB von dem jeweiligen Steuergeräten mit OBD.

Geht das mit dem FIS-Control.

Mfg



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: So 04 Dez, 2011 21:55  Titel:  (Kein Titel)
Nach untenNach oben

@W201
Für dein Vorhaben ist das FIS-Control nicht geeignet. Vor allem fehlt dir auch die passende Software auf deinem CarPC. Du müsstest die Navi-Software und den Media-Player anzapfen, um an die entsprechenden Daten zu kommen. Und danach müssten die Daten noch passend für die Anzeige im FIS-Display aufbereitet werden.

Als Diagnose-Interface könntest du das FIS-Control zwar schon benutzen. Aber für diesen Zweck gibt es günstigere Lösungen.



    
W201
Frischfleisch
Frischfleisch


Alter: 48
Anmeldung: 03.04.2011
Beiträge: 16



BeitragVerfasst: So 04 Dez, 2011 23:44  Titel:  (Kein Titel)
Nach untenNach oben

Hallo,

@ZZottel

Was kann man da machen damit über Carpc die gleichen Funktionen wie im NaviPlus angezeogt bekommen.

Für Tipps oder Unterstürtzung würde ich mich freuen.

Mfg



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: Mo 05 Dez, 2011 00:17  Titel:  (Kein Titel)
Nach untenNach oben

@W201
Fertige Lösungen dafür kenne ich nicht. Selbermachen ist für einen allein sicherlich zu zeitaufwändig.



    
Sascha1271991
Frischfleisch
Frischfleisch


Alter: 32
Anmeldung: 06.04.2010
Beiträge: 17
Wohnort: Eschershausen


BeitragVerfasst: So 23 März, 2014 22:52  Titel:  (Kein Titel)
Nach untenNach oben

Hi, du wirst mir wahrscheinlich nicht verraten, wie das 3LB Protocoll funktioniert oder? Smile

Bin zwar auf einige Informationen wie FIS Fool gestoßen, aber die Seiten existieren schon gar nicht mehr, sodass ich auch keinen Quellcode für Projekte gefunden habe.
Würde halt gern die oberen zwei Zeilen ansteuern können und wenns geht auch das ganze Display Pixel für Pixel.

Hab auch erfahrung mit C und dem programmieren von Atmegas. Hab auch bereits Grafikdisplays angesteuert. Nur zu dem 3LB find ich halt quasi nichts. Hab auch leider kein Navi da was 3LB unterstützt, sonst würd ich den Datenverkehr einfach mitloggen.

Mit freundlichem Gruß Sascha

Hardware: AMD Athlon x2 4450e, 1 GB DDR2 OCZ 800, AsRock N68-S, Audigy 2 ZS

Software: Windows xp Prof. SP3

    
vegfokic
Frischfleisch
Frischfleisch


Alter: 42
Anmeldung: 13.03.2016
Beiträge: 5



BeitragVerfasst: So 13 März, 2016 09:51  Titel:  (Kein Titel)
Nach untenNach oben

Hi
Anybody has the basic source code for atmega to use the first two line of the FIS display? I have a Passat B5.5 cluster and I want to show some text on it via enable, data, clock wires.



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: So 13 März, 2016 10:53  Titel:  (Kein Titel)
Nach untenNach oben

I posted some BASCOM source code for this here:
http://www.car-pc.info/phpBB2/viewtopic.php?p=267222#267222

I also did an improved code for the ATMEGA in C:
http://nefariousmotorsports.com/forum/index.php?PHPSESSID=qm6gkicd2i06hihs87pq9n4q03&topic=8787.msg7 8125#msg78125



    
vegfokic
Frischfleisch
Frischfleisch


Alter: 42
Anmeldung: 13.03.2016
Beiträge: 5



BeitragVerfasst: So 13 März, 2016 20:22  Titel:  (Kein Titel)
Nach untenNach oben

@ZZottel
I tried the bascom code in your first link but nothing happened. I dont know where is the problem. The upper part of the FIS display is still blank. My cluster coding begin with 21 this consist of the +16 navigation, I think it has to be set if I want that the cluster would be able to get the messages via 3LB. I use atmega8 running at 8Mhz internal frequency supplied at 5V. The atmega pins are a little bit different than in your code. I connected the FIS clock to PD2, FIS data to PD3, FIS en to PD4 and they are also modified in the first part of bascom code. May I do something wrong?

The second link source code also running on atmega8 but also nothing happened. I can not send text or caracter to the cluster via serial. only some caracter come off from the atmega to the PC in terminal windows.



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: So 13 März, 2016 20:31  Titel:  (Kein Titel)
Nach untenNach oben

The coding is not correct. The example uses the "Radio protocol" not the "Navigation protocol". Don't set the coding to +16.

The source code I have posted in the other forum does not use the UART. I post it here again.
Beacuse you are using ATMEGA8 with different clock, you will have to change the Timers.

Code:

/*
 * Program: avr_to_fis
 * Target: ATMega32 @ 11.0592 MHz
 * IDE: WinAVR-20100110
 * Compiler: avr-gcc (WinAVR 20100110) 4.3.3
 * Author: Stefan Bieger
 * Website: www.fis-control.de
 * Date: 2015-07-26
 */

#include <avr>
#include <avr>
#include <avr>
#include <util>
#include <string>

#define CLK 0x20 // Portd.5
#define DAT 0x10 // Portd.4
#define ENA 0x08 // Portd.3

char string[17] = {0};
uint8_t update = 0;

void init_gpio(void)
{
   PORTD = CLK | DAT;
   DDRD = CLK | DAT | ENA; // ENA is really unidirectional in radio mode (not like the 3LB for nav)
}

void init_timer(void)
{
   TCCR1B = (1<<WGM01) | (1<<CS10); // CTC mode, no prescaler
   TIMSK = (1<<OCIE1A); // enable CTC interrupt
   OCR1A = 0xFFFF; // initialize to some value
}

uint8_t calc_checksum(const uint8_t* const data)
{
   uint8_t i;
   uint8_t checksum = 0xFF;

   for (i=0; i<17; i++)
   {
      checksum -= data[i];
   }

   return (checksum);
}

void write_to_fis(const char* const text)
{
   update = 0;
   strncpy(string, text, 16);
   update = 1;
}

int main(void)
{
   wdt_disable();
   init_gpio();
   init_timer();
   sei();

   while (1)
   {
      write_to_fis("12345678ABCDEFGH");
      _delay_ms(1000);
      write_to_fis("HALLO   WELT");
      _delay_ms(1000);
   }
}

ISR(TIMER1_COMPA_vect)
{
   static uint8_t state = 0;
   static uint8_t byte = 0;
   static uint8_t bit = 0;
   static uint8_t array[18] = {0};

   switch (state)
   {
      case 0:
         if (update)
         {
            update = 0;
            array[0] = 0xF0;
            memset(&array[1], 0x20, 16); // fill with blanks
            memcpy(&array[1], string, strlen(string));
            array[17] = calc_checksum(array);
         }

         if (array[0] == 0xF0)
         {
            PORTD = CLK | DAT | ENA; // ENA high
            TCCR1B = (1<<WGM01) | (1<<CS10); // CTC mode, no prescaler
            OCR1A = 1106 - 1; // next interrupt in 100 us
            byte = 0;
            bit = 7;
            state = 1;
         }
         break;
      case 1:
         PORTD &= ~ENA; // ENA low
         state = 2;
         break;
      case 2:
         PORTD |= ENA;
         OCR1A = 553 - 1; // next interrupt in 50 us
         state = 3;
         break;
      case 3:
         if (array[byte] & (1<<bit))
         {
            PORTD &= ~DAT;
         }
         else
         {
            PORTD |= DAT;
         }
         OCR1A = 365 - 1; // next interrupt in 33 us
         state = 4;
         break;
      case 4:
         PORTD &= ~CLK;
         OCR1A = 730 - 1; // next interrupt in 66 us
         state = 5;
         break;
      case 5:
         PORTD |= CLK;
         OCR1A = 365 - 1; // next interrupt in 33 us

         if (bit)
         {
            bit--;
            state = 3;
         }
         else if (byte < 17)
         {
            bit = 7;
            byte++;
            state = 3;
         }
         else
         {
            state = 6;
         }
         break;
      case 6:
         PORTD |= DAT;
         OCR1A = 166 - 1; // next interrupt in 15 us
         state = 7;
         break;
      case 7:
         PORTD &= ~ENA; // ENA low
         TCCR1B = (1<<WGM01) | (1<<CS12); // CTC mode, prescaler 256
         OCR1A = 21600 - 1; // next interrupt in 500 ms
         state = 0;
         break;
   }
}



    
vegfokic
Frischfleisch
Frischfleisch


Alter: 42
Anmeldung: 13.03.2016
Beiträge: 5



BeitragVerfasst: Mo 14 März, 2016 15:23  Titel:  (Kein Titel)
Nach untenNach oben

Thanks for the code

I modyfied the cluster coding and the bascom code works well Smile
After that I tried the C code with some modyfication to mach atmega8 but something wrong. In the interrupts value of OCR1A changed 11.0592/8=1,38 times smaller because I use 8Mhz instead of 11,05MHz.
The problem is that the atmega8 dont has WGM01 than the atmega32 therefore I used WGM12 and WGM13 to CTC mode. I dont know whether it is good or not or any other problem there is.

Code:
#include <util>
#include <avr>
#include <avr>
#include <string>
#include <avr>

#define CLK 0x02 // Portb.1 OC1A
#define DAT 0x04 // Portb.2 OC1B
#define ENA 0x20 // Portd.5 INT1

char string[17] = {0};
uint8_t update = 0;

void init_gpio(void)
{
PORTB = CLK | DAT;
DDRB = CLK | DAT; // ENA is really unidirectional in radio mode (not like the 3LB for nav)
DDRD = ENA; // ENA is really unidirectional in radio mode (not like the 3LB for nav)
}

void init_timer(void)
{
TCCR1B = (1<<WGM12) | (1<<CS10) | (1<<WGM13); // CTC mode, no prescaler TCCR1B = (1<<WGM01) | (1<<CS10>1 mind kettőbe ctc mód
TIMSK = (1<<OCIE1A); // enable CTC interrupt
OCR1A = 0xFFFF; // initialize to some value

}

uint8_t calc_checksum(const uint8_t* const data)
{
uint8_t i;
uint8_t checksum = 0xFF;

for (i=0; i<17; i++)
{
checksum -= data[i];
}

return (checksum);
}

void write_to_fis(const char* const text)
{
update = 0;
strncpy(string, text, 16);
update = 1;
}

int main(void)
{
wdt_disable();
init_gpio();
init_timer();
sei();

while (1)
{
write_to_fis("12345678ABCDEFGH");
_delay_ms(1000);
write_to_fis("HALLO WELT");
_delay_ms(1000);
}
}

ISR(TIMER1_COMPA_vect)
{
static uint8_t state = 0;
static uint8_t byte = 0;
static uint8_t bit = 0;
static uint8_t array[18] = {0};

switch (state)
{
case 0:
if (update)
{
update = 0;
array[0] = 0xF0;
memset(&array[1], 0x20, 16); // fill with blanks
memcpy(&array[1], string, strlen(string));
array[17] = calc_checksum(array);
}

if (array[0] == 0xF0)
{
PORTB = CLK | DAT; // ENA high
PORTD = ENA; // ENA high
TCCR1B = (1<<WGM12) | (1<<CS10) | (1<<WGM13); // CTC mode, no prescaler
OCR1A = 800 - 1; // next interrupt in 100 us
byte = 0;
bit = 7;
state = 1;
}
break;
case 1:
PORTD &= ~ENA; // ENA low
state = 2;
break;
case 2:
PORTD |= ENA;
OCR1A = 400 - 1; // next interrupt in 50 us
state = 3;
break;
case 3:
if (array[byte] & (1<<bit))
{
PORTB &= ~DAT;
}
else
{
PORTB |= DAT;
}
OCR1A = 264 - 1; // next interrupt in 33 us
state = 4;
break;
case 4:
PORTB &= ~CLK;
OCR1A = 528 - 1; // next interrupt in 66 us
state = 5;
break;
case 5:
PORTB |= CLK;
OCR1A = 264 - 1; // next interrupt in 33 us

if (bit)
{
bit--;
state = 3;
}
else if (byte < 17)
{
bit = 7;
byte++;
state = 3;
}
else
{
state = 6;
}
break;
case 6:
PORTB |= DAT;
OCR1A = 120 - 1; // next interrupt in 15 us
state = 7;
break;
case 7:
PORTD &= ~ENA; // ENA low
TCCR1B = (1<<WGM12) | (1<<CS12) | (1<<WGM13); // CTC mode, prescaler 256
OCR1A = 15625 - 1; // next interrupt in 500 ms
state = 0;
break;
}
}



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: Mo 14 März, 2016 16:02  Titel:  (Kein Titel)
Nach untenNach oben

I think the (1<<WGM13) is wrong. Just don't set it.
Rest looks good to me.



    
vegfokic
Frischfleisch
Frischfleisch


Alter: 42
Anmeldung: 13.03.2016
Beiträge: 5



BeitragVerfasst: Mo 14 März, 2016 16:14  Titel:  (Kein Titel)
Nach untenNach oben

Does not work without (1<<WGM13) also.
I noticed that when you paste your code the first some lines which consist of #include did not appear fully (avr.interreupt.h, avr.wdt.h, avr.io.h) I was in trouble but I solved the missing parts. I think they were in the bracket.
There is no problem during compiler but he display is still blank.
Whether is there any missing parts from your code because of paste loos?



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: Mo 14 März, 2016 17:09  Titel:  (Kein Titel)
Nach untenNach oben

I will upload the source code as attachment later this evening.



    
ZZottel
Forumkenner
Forumkenner


Alter: 45
Anmeldung: 10.10.2007
Beiträge: 152



BeitragVerfasst: Mo 14 März, 2016 21:08  Titel:  (Kein Titel)
Nach untenNach oben

Here it is.



    
vegfokic
Frischfleisch
Frischfleisch


Alter: 42
Anmeldung: 13.03.2016
Beiträge: 5



BeitragVerfasst: Mo 14 März, 2016 21:10  Titel:  (Kein Titel)
Nach untenNach oben

Thanks



    
Beiträge der letzten Zeit anzeigen:      
Du musst dich anmelden um Beiträge zu schreiben!Du musst dich anmelden um Beiträge zu schreiben!
Vorheriges Thema anzeigenDieses Thema verschickenZeige Benutzer, die dieses Thema gesehen habenDieses Thema als Datei sichernPrintable versionEinloggen, um private Nachrichten zu lesenNächstes Thema anzeigen

Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum nicht posten
Du kannst Dateien in diesem Forum nicht herunterladen
 

CarTFT
Forenspecials



Forensicherheit - Alle Zeiten sind GMT + 1 Stunde -
Powered by phpBB2 Plus, phpBB Styles, based on phpBB © 2001/6 phpBB Group :: FI Theme ::

[ Zeit: 0.6004s ][ Queries: 48 (0.1991s) ][ GZIP Ein - Debug Ein ]
carTFT.com