www.blafusel.de


  Home  |   Privat  |   Impressum  |   Bücher  |   Computer  |   Mikrocontroller  |   Misc  |   OBD  |   Forum
Aktuelle Zeit: Donnerstag 28. März 2024, 22:02

Alle Zeiten sind UTC + 1 Stunde




Ein neues Thema erstellen Auf das Thema antworten  [ 4 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Mittwoch 18. Juni 2008, 03:38 
Hi Florian,

I have acquired a OBD LCD Mod C and it works fine but does not connect to the ECU of my Fiat Marea 2.0 20V. Thats said but its ok since my car was not listed as compatible.

But I would like to use the board to develop my own OBD and I'm having a lot of problems with the LCD. I have tried several different LCD libraries but since is uses a custom pinout to connect the uC to the LCD I have not been able to write on it.

I have tried "Peter Fleury" lcd library and still nothing. Not even the test_lcd.c demo works with this board.

So could you share the lcd functions used with this board ?

Thanks,

Max Oliver
Brazil


Nach oben
  
 
 Betreff des Beitrags:
BeitragVerfasst: Donnerstag 19. Juni 2008, 08:39 
Offline
Administrator
Benutzeravatar

Registriert: Mittwoch 6. Oktober 2004, 09:52
Beiträge: 2122
I did not share the source. See http://www.blafusel.de/misc/faq.html.

Try the lcd code in the download on this page: http://www.elektor.de/jahrgang/2006/mai ... ynkx?tab=3

With little changings it should work.


Nach oben
 Profil  
 
 Betreff des Beitrags:
BeitragVerfasst: Donnerstag 19. Juni 2008, 23:54 
Dear Florian,

Thanks for the reply.

I have downloaded the source from ELEKTOR and seems pretty simple and similar to other examples. But I'm not very good with WINAVR and still could not make the LCD to work.

Also I could not understand the comments since they are in German. :(

I have written a small demo to blink the LED and accept input for the button and everything works ok with the exception of the LCD.

I have also turn on the backlight via "PORTD = 0x80;"

My lcd_ini function looks like this:
Code:
#define LCD_CTRL 1       // (0 = HD44780, 1= KS0073)

void lcd_ini ()
{
   lcd_port_ini();
   DDRC = 0x3F;         // setze Portrichtung (1 = Ausgang): 0011 1111

   DDRD = 0x80;
   PORTD = 0x80;         // LCD Backlight On

   delay_ms(100);         // 40ms warten bis LCD wirklich bereit! Wir können nicht BUSY auswerten.
                     // Es gibt Displays die so lange brauchen (z. B. Optrex DMC20481)

   lcd_set4bit();         // ab jetzt 4-Bit-Modus
   
   lcd_write(0x2C,0);      // 4x20 Spezial: Function Set (0010 1100): 4-Bit, 2 Line, RE-Bit, Dot Scroll, Normal Mode
   lcd_write(0x09,0);      // 4x20: Extended Function Set (0000 1001): 5 dot font, Normal Cursor, 4 Line Display   


   lcd_write(0x28,0);      // B 0010 1000 => Function Set: 4Bit (kein 8-Bit Bus), zweizeiliges Display, 5x7 Dots/Zeichen (kein 5x10), RE-Bit aus
//   lcd_write(0x0F,0);      // B 0000 1000 => Display On/Off: Display ein, Cursor an, Blinken an
   lcd_write(0x0C,0);      // B 0000 1100 => Display On/Off: Display ein, Cursor aus, Blinken aus
   lcd_write(0x06,0);      // B 0000 0110 => Entry Mode Set: DD-RAM autom. inkr., Cursor bewegen
   
   lcd_cls();            // Display löschen
}


I'm using the following version of AVR-GCC:
Code:
C:\AVR\050176-81\lcd_4x20>avr-gcc -v
Reading specs from F:/WinAVR/lib/gcc/avr/3.4.6/specs
Configured with: ../gcc-3.4.6/configure --prefix=/c/WinAVR --target=avr --enable
-languages=c,c++ --with-dwarf2 --enable-win32-registry=WinAVR --disable-nls
Thread model: single
gcc version 3.4.6


On the makefile I have changed the following:
Code:
# MCU name
MCU = atmega32

# Processor frequency.
#     This will define a symbol, F_CPU, in all source code files equal to the
#     processor frequency. You can then use this symbol in your source code to
#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
#     automatically to create a 32-bit value in your source code.
F_CPU = 8000000


And the ATMEGA32 I'm using is FUSED for "Ext. Crystal/Resonator High Freq.; Start-up time 16CK + 64ms" to work with the crystal installed on your board.

When I put your orignal Atmega644 it works perfectly. But none of my attempts to program the Atmega32 made the LCD to work.

What version of AVR-GCC do you use ?

Best regards,

Max Oliver

[/code]


Nach oben
  
 
 Betreff des Beitrags:
BeitragVerfasst: Sonntag 22. Juni 2008, 04:25 
Offline

Registriert: Mittwoch 18. Juni 2008, 03:26
Beiträge: 1
I give up ! :(

Could not make this LCD to work at all !

It works with the Atmega64 supplied with the kit. But does not work with Atmega32 or Atmega16 that I have tried programming with AVR-GCC & WinAvr.

The LCD library I used works perfect with my OLIMEX board. Also works with many other boards I have made. But refuses to work with this board I dont know why.

The library that you reffer on ELEKTOR site also doesn't work.

I understand that you dont share the source code of your application thats ok. But you could at least share the lcd functions used to work with this board. Or make a test library open source so we can understand how to use this board. Otherwise why bother to sell a kit with schematics and ICSP programmer, etc ?

Using this configuration of PORTC 4 data pins and PORTC4 and PORTC5 for RS and EN is so wierd.

Why not use a standard PORTC like Codevision and LCD functions in WinAVR ? Would be so much easy.

I will put my kit to sell at EBAY so at least I recover the cost.

[]s

Max


Nach oben
 Profil Private Nachricht senden  
 
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 4 Beiträge ] 

Alle Zeiten sind UTC + 1 Stunde


Wer ist online?

Mitglieder in diesem Forum: Majestic-12 [Bot] und 22 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de