Jump to content
ELFORUM - Forumul electronistilor

Termometru Atmega8 & DisplayNokia3310


Recommended Posts

Buna seara

 

Am primit un display de nokia 3310 si avand cateva MC m-am decis sa fac ceva montaj cu ele.

Cautand pe net am dat de diferite scheme printre care si acest termometru: http://tinkerish.com/blog/?p=88 pe care l-as dori sa-l fac!

Dar m-am impotmolit la copilarea fisierului sursa :(

am atasat sursa + erorile ce le primesc:

[attachment=0]avr-spiceduino-3310-thermistor.zip[/attachment]

 

rm -rf main.o 3310_routines.o  main.elf dep/* main.hex main.eep main.lss main.mapBuild succeeded with 0 Warnings...avr-gcc  -mmcu=atmega8 -Wall -gdwarf-2 -std=gnu99   -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT main.o -MF dep/main.o.d  -c  ../main.c../main.c: In function 'beep':../main.c:30: warning: '_delay_loop_2' is static but used in inline function 'beep' which is not static../main.c: In function 'main':../main.c:189: warning: pointer targets in passing argument 1 of 'LCD_writeString_megaFont' differ in signednessavr-gcc  -mmcu=atmega8 -Wall -gdwarf-2 -std=gnu99   -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT 3310_routines.o -MF dep/3310_routines.o.d  -c  ../3310_routines.cavr-gcc -mmcu=atmega8 -Wl,-Map=main.map main.o 3310_routines.o     -o main.elfc:/winavr-20090313/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: main.elf section .text will not fit in region textc:/winavr-20090313/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: region text overflowed by 1310 bytesmake: *** [main.elf] Error 1Build failed with 2 errors and 2 warnings...

Ma puteti ajuta pt elucidarea problemei ....

 

Multumesc

Link to comment
  • 6 months later...
  • Replies 29
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Guest ferry

Salut , nu vreau sa te dezamagesc dar am incercat sa construiesc si eu un termometru cu display nokia 3310 dar nu functioneaza.Adevarat ca este o schema cu pic12f675 si ds18b20 dar m-am chinuit mult pentru ca displayul daca nu este original contactele difera un pic adica sunt mai naspa . Stiu ...pt ca am comandat 3 bucati de la un magazin de telefoane mobile. Plus ca am avut probleme si cu realizarea circuitului imprimat in zona unde tr. sa faca contact cu lcd -ul.Adica tr .sa fie cu o precizie foarte mare pt.ca daca nu picorusele lcd ului nu calca pe unde trebuie .......si chesti si chestii etc .si in fine m-am enervat si am zis ca cumpar un termometru gata facut cu 30 de lei . Daca nu ma crezi iti trimit si foto. cu ce m-am chinuit ....si mentionez nu e primul meu proiect.

Link to comment

... pe aici, pe forum cred ca am pus si hexul pentru ceas si termometru cu DS18B20+PIC 16F648A + display Nokia 3310.

Si nu se poate sa mai postezi odata si hexul si schema? :aplauze Multe din fisiere au fost afectate de problemele tehnice ale forumului. :da Este chiar interesant acest proiect, avand in vedere ca display-uri de Nokia 3310 se gasesc destul de usor acum. :rade: Eu, unul, as fi interesat de acest proiect 2 in 1. :freaza:Ce poti spune despre precizia masuratorii temperaturii, precum si de precizia ceasului?Mersi.
Link to comment

Merge brici !!! Cu 2 acumulatori HighCapacity ;)...Mentiuni : portb.1 -setare ore; portb.2 -setare minute ; portb.3 -start. Toate prin R=4k7 la plus, buton spre masa. Nu am mai avut timp sa figurez in simulare si butoanele...daca sunt totusi nelamuri, voi reveni. A, atentie !!! Montajul se alimenteaza la maxim 3,3 volti !!!Scuze ca postez despre PIC-uri in aria despre ATMEL ! Am facut-o numai la solicitare; daca deranjez, rog moderatorii sa ma ierte si sa mute postul ! Numai bine !

Link to comment
Guest ferry

M-ai convins cu pozele....am sa caut in debara ca nu am aruncat la gunoi.Trebuie sa fie pe undeva.Dar daca nici acuma nu o sa reusesc sa-l pornesc il sparg in bucati mici cu ciocanul si il mananc !!!!

Link to comment
  • 6 months later...

As dori un exemplu de conectare attiny2313 la un LCD Nokia. Vreau ceva basic, gen "Hello world". Puteti sa ma ajutati?

Softul este destul de mare si este la limita celor 2K Bytes daca folosesti ATtiny2313. Depinde ce vrei sa faci. Daca vrei doar sa afiseze ceva ai putea folosi ATtiny2313. Daca vrei sa mai faca si altceva atunci vei avea nevoie de un alt controller , de ex. un atmega8.Softul de mai jos este scris in Bascom. Sper sa va fie de folos.Toate cele bune!
$regfile = "m8def.dat"$crystal = 8000000'$hwstack = 32                                               ' default use 32 for the hardware stack'$swstack = 8                                                ' default use 8 for the SW stack'$framesize = 24                                             ' default use 24 for the frame space'Define I/O and name themConfig Portd.7 = OutputDc Alias Portd.7Config Portb.0 = OutputCe Alias Portb.0Config Portb.7 = OutputRe Alias Portb.7Config Portd.0 = OutputControl Alias Portd.0Config Portd.3 = OutputSpeaker Alias Portd.3'Configure ADCConfig Adc = Single , Prescaler = Auto , Reference = Avcc'Configure SPI in soft modeConfig Spi = Soft , Din = Portb.1 , Dout = Portd.6 , Ss = None , Clock = Portd.5'Define variablesDim Vcellaadc As Word , Vcellaladder As Single , Vcell1 As Single , Vcell1string As String * 5Dim Vcellbadc As Word , Vcellbladder As Single , Vcell2 As Single , Vcellb As Single , Vcell2string As String * 5Dim Vcellcadc As Word , Vcellcladder As Single , Vcell3 As Single , Vcellc As Single , Vcell3string As String * 5Dim Vcelldadc As Word , Vcelldladder As Single , Vcell4 As Single , Vcelld As Single , Vcell4string As String * 5Dim Vcell As Single , Vcellstring As String * 16 , V4cells As Single , V4cellsstring As String * 5Dim Intloop As Integer , Column As Byte , Charasc As Byte , Stringtoprint As String * 14Dim Loops As ByteDim Length As ByteDim Character As String * 1Declare Sub Commandout(byval Value As Byte)Declare Sub Dataout(byval Value As Byte)Declare Sub Position(byval X As Byte , Byval Y As Byte)'Start ADCStart Adc'ResetRe = 0Waitus 250Re = 1'Initialise SpiSpiinitGosub InitialisationGosub Clearlcd'Main program loopDo   Gosub Readadc   Call Position(0 , 0)   'Stringtoprint = "V PACK"   Stringtoprint = " Hello World  "   Gosub Printstring   Position 0 , 2   'Stringtoprint = "V CELL 4"   Stringtoprint = Vcell4string + " V CELL 4"   Gosub Printstring   Position 0 , 3   'Stringtoprint = "V CELL 3"   Stringtoprint = Vcell3string + " V CELL 3"   Gosub Printstring   Position 0 , 4   'Stringtoprint = "V CELL 2"   Stringtoprint = Vcell2string + " V CELL 2"   Gosub Printstring   Position 0 , 5   'Stringtoprint = "V CELL 1"   Stringtoprint = Vcell1string + " V CELL 1"   Gosub PrintstringLoopStopInitialisation:   Commandout &H21                                          'Extended command mode   Commandout &HC8   Commandout &H06   Commandout &H13   Commandout &H20                                          'Normal command mode   Commandout &H0CReturnClearlcd:   Commandout &H20                                          'Normal command mode   Commandout &H0C                                          'Normal screen   Commandout &H80                                          'Set RAM address to 0   Dc = 1                                                   'Make sure that we are in data mode   For Intloop = 0 To 503                                   'Send 504 blanks      Dataout &H00   NextReturnSub Commandout(byval Value As Byte)   'Go to command mode   Dc = 0   Spiout Value , 1   'Go to data mode   Dc = 1End SubSub Dataout(byval Value As Byte)   'Go to data mode   Dc = 1   Ce = 0   Spiout Value , 1   Ce = 1End SubSub Position(byval X As Byte , Byval Y As Byte)             'Y is the row (0-5), X is the column (0-13)   Local Nout As Byte   'Go to command mode   Dc = 0   'Go to horizontal addressing   Nout = &H20   Spiout Nout , 1   'Send horizontal address   Ce = 0   Nout = X * &H06   Nout = Nout + &H80   Spiout Nout , 1   Ce = 1   'Send vertical address   Ce = 0   Nout = Y + &H40   Spiout Nout , 1   Ce = 1   'Go to data mode   Dc = 1End SubPrintstring:   'Establish the number of characters   Length = Len(stringtoprint)   'Loop through the string   For Loops = 1 To Length      'Get the current character      Character = Mid(stringtoprint , Loops , 1)      'Position the pointer to the correct character in the Eeprom and read the first byte      Select Case Character         Case "0" : Restore Zero         Case "1" : Restore One         Case "2" : Restore Two         Case "3" : Restore Three         Case "4" : Restore Four         Case "5" : Restore Five         Case "6" : Restore Six         Case "7" : Restore Seven         Case "8" : Restore Eight         Case "9" : Restore Nine         Case "A" : Restore A         Case "B" : Restore B         Case "C" : Restore C         Case "D" : Restore D         Case "E" : Restore E         Case "F" : Restore F         Case "G" : Restore G         Case "H" : Restore H         Case "I" : Restore I         Case "J" : Restore J         Case "K" : Restore K         Case "L" : Restore L         Case "M" : Restore M         Case "N" : Restore N         Case "O" : Restore O         Case "P" : Restore P         Case "Q" : Restore Q         Case "R" : Restore R         Case "S" : Restore S         Case "T" : Restore T         Case "U" : Restore U         Case "V" : Restore V         Case "W" : Restore W         Case "X" : Restore X         Case "Y" : Restore Y         Case "Z" : Restore Z         Case "Å" : Restore Aa         Case "Ä" : Restore Ae         Case "Ö" : Restore Oe         Case "a" : Restore A1         Case "b" : Restore B1         Case "c" : Restore C1         Case "d" : Restore D1         Case "e" : Restore E1         Case "f" : Restore F1         Case "g" : Restore G1         Case "h" : Restore H1         Case "i" : Restore I1         Case "j" : Restore J1         Case "k" : Restore K1         Case "l" : Restore L1         Case "m" : Restore M1         Case "n" : Restore N1         Case "o" : Restore O1         Case "p" : Restore P1         Case "q" : Restore Q1         Case "r" : Restore R1         Case "s" : Restore S1         Case "t" : Restore T1         Case "u" : Restore U1         Case "v" : Restore V1         Case "w" : Restore W1         Case "x" : Restore X1         Case "y" : Restore Y1         Case "z" : Restore Z1         Case "å" : Restore Aa1         Case "ä" : Restore Ae1         Case "ö" : Restore Oe1         Case " " : Restore Spac         Case "-" : Restore Dash         Case "." : Restore Dot         Case ":" : Restore Colon         Case ">" : Restore Arrowright         Case "°" : Restore Degree         Case "@" : Restore Alpha         Case "&" : Restore Ampersand         Case "'" : Restore Apostrophe         Case "<" : Restore Arrowleft         Case "*" : Restore Asterisc         Case "," : Restore Comma         Case "$" : Restore Dollar         Case "=" : Restore Equals         Case "!" : Restore Exclamation         Case "½" : Restore Grid         Case "#" : Restore Hash         Case "(" : Restore Leftparagraph         Case "[" : Restore Leftsquareparagraph         Case "%" : Restore Percent         Case "+" : Restore Plus         Case "^" : Restore Powerof         Case "?" : Restore Question         Case Chr(34) : Restore Quotation         Case "]" : Restore Rightparagraph         Case ")" : Restore Rightsquareparagraph         Case ";" : Restore Semicolon         Case "/" : Restore Slash         Case "\" : Restore Backslash         Case "_" : Restore Underscore      End Select      'Read and print each column      For Intloop = 1 To 6         Read Column         Call Dataout(column)      Next Intloop   Next LoopsReturnReadadc:   'Reset Watchdog   'Waitms 50   Vcellaadc = Getadc(0)   Vcellbadc = Getadc(1)   Vcellcadc = Getadc(2)   Vcelldadc = Getadc(3)   Vcellaladder = Vcellaadc * 4.37836   Vcell1 = Vcellaladder / 1024   Vcell = Vcell1   Gosub Cstr   Vcell1string = Vcellstring   Vcellbladder = Vcellbadc * 9.876   Vcellb = Vcellbladder / 1024   Vcell2 = Vcellb - Vcell1   Vcell = Vcell2   Gosub Cstr   Vcell2string = Vcellstring   Vcellcladder = Vcellcadc * 13.168   Vcellc = Vcellcladder / 1024   Vcell3 = Vcellc - Vcellb   Vcell = Vcell3   Gosub Cstr   Vcell3string = Vcellstring   Vcelldladder = Vcelldadc * 18.7644   Vcelld = Vcelldladder / 1024   Vcell4 = Vcelld - Vcellc   Vcell = Vcell4   Gosub Cstr   Vcell4string = Vcellstring   V4cells = Vcelld   Vcell = V4cells   Gosub Cstr   V4cellsstring = VcellstringReturnCstr:   Vcellstring = Str(vcell)   Vcellstring = Left(vcellstring , 5)Return'ASCII data'DigitsZero:Data &H3E , &H51 , &H49 , &H45 , &H3E , &H00One:Data &H00 , &H42 , &H7F , &H40 , &H00 , &H00Two:Data &H42 , &H61 , &H51 , &H49 , &H46 , &H00Three:Data &H22 , &H41 , &H49 , &H49 , &H36 , &H00Four:Data &H18 , &H14 , &H12 , &H7F , &H10 , &H00Five:Data &H27 , &H45 , &H45 , &H45 , &H39 , &H00Six:Data &H3E , &H49 , &H49 , &H49 , &H32 , &H00Seven:Data &H61 , &H11 , &H09 , &H05 , &H03 , &H00Eight:Data &H36 , &H49 , &H49 , &H49 , &H36 , &H00Nine:Data &H26 , &H49 , &H49 , &H49 , &H3E , &H00'Upper-caseA:Data &H7C , &H12 , &H11 , &H12 , &H7C , &H00B:Data &H7F , &H49 , &H49 , &H49 , &H36 , &H00C:Data &H3E , &H41 , &H41 , &H41 , &H22 , &H00D:Data &H7F , &H41 , &H41 , &H41 , &H3E , &H00E:Data &H7F , &H49 , &H49 , &H49 , &H41 , &H00F:Data &H7F , &H09 , &H09 , &H09 , &H01 , &H00G:Data &H3E , &H41 , &H49 , &H49 , &H3A , &H00H:Data &H7F , &H08 , &H08 , &H08 , &H7F , &H00I:Data &H00 , &H41 , &H7F , &H41 , &H00 , &H00J:Data &H20 , &H41 , &H41 , &H41 , &H3F , &H00K:Data &H7F , &H08 , &H14 , &H22 , &H41 , &H00L:Data &H7F , &H40 , &H40 , &H40 , &H40 , &H00M:Data &H7F , &H02 , &H04 , &H02 , &H7F , &H00N:Data &H7F , &H04 , &H08 , &H10 , &H7F , &H00O:Data &H3E , &H41 , &H41 , &H41 , &H3E , &H00P:Data &H7F , &H09 , &H09 , &H09 , &H06 , &H00Q:Data &H3E , &H41 , &H51 , &H61 , &H7E , &H00R:Data &H7F , &H09 , &H19 , &H29 , &H46 , &H00S:Data &H06 , &H49 , &H49 , &H49 , &H30 , &H00T:Data &H01 , &H01 , &H7F , &H01 , &H01 , &H00U:Data &H3F , &H40 , &H40 , &H40 , &H3F , &H00V:Data &H1F , &H20 , &H40 , &H20 , &H1F , &H00W:Data &H7F , &H20 , &H10 , &H20 , &H7F , &H00X:Data &H63 , &H14 , &H08 , &H14 , &H63 , &H00Y:Data &H03 , &H04 , &H78 , &H04 , &H03 , &H00Z:Data &H61 , &H51 , &H49 , &H45 , &H43 , &H00Aa:Data &H78 , &H14 , &H15 , &H14 , &H78 , &H00Ae:Data &H78 , &H15 , &H14 , &H15 , &H78 , &H00Oe:Data &H38 , &H45 , &H44 , &H45 , &H38 , &H00'SpaceSpac:Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00'Lower-caseA1:Data &H30 , &H4A , &H4A , &H52 , &H7C , &H00B1:Data &H3F , &H48 , &H44 , &H44 , &H38 , &H00C1:Data &H38 , &H44 , &H44 , &H44 , &H28 , &H00D1:Data &H38 , &H44 , &H44 , &H48 , &H7F , &H00E1:Data &H38 , &H54 , &H54 , &H54 , &H18 , &H00F1:Data &H00 , &H04 , &H7E , &H05 , &H00 , &H00G1:Data &H0C , &H52 , &H52 , &H4A , &H3C , &H00H1:Data &H7F , &H08 , &H04 , &H04 , &H78 , &H00I1:Data &H00 , &H44 , &H7D , &H40 , &H00 , &H00J1:Data &H00 , &H40 , &H44 , &H3D , &H00 , &H00K1:Data &H7F , &H20 , &H10 , &H28 , &H44 , &H00L1:Data &H00 , &H41 , &H7F , &H40 , &H00 , &H00M1:Data &H7C , &H04 , &H18 , &H04 , &H7C , &H00N1:Data &H7C , &H08 , &H04 , &H04 , &H78 , &H00O1:Data &H38 , &H44 , &H44 , &H44 , &H38 , &H00P1:Data &H7C , &H14 , &H24 , &H24 , &H18 , &H00Q1:Data &H18 , &H24 , &H24 , &H14 , &H7C , &H00R1:Data &H7C , &H04 , &H04 , &H08 , &H00 , &H00S1:Data &H08 , &H54 , &H54 , &H54 , &H20 , &H00T1:Data &H04 , &H3F , &H44 , &H40 , &H00 , &H00U1:Data &H3C , &H40 , &H40 , &H40 , &H3C , &H00V1:Data &H1C , &H20 , &H40 , &H20 , &H1C , &H00W1:Data &H3C , &H40 , &H30 , &H40 , &H3C , &H00X1:Data &H44 , &H28 , &H10 , &H28 , &H44 , &H00Y1:Data &H0C , &H50 , &H50 , &H48 , &H3C , &H00Z1:Data &H44 , &H64 , &H54 , &H4C , &H44 , &H00Aa1:Data &H30 , &H48 , &H4A , &H48 , &H78 , &H00Ae1:Data &H30 , &H4A , &H48 , &H4A , &H78 , &H00Oe1:Data &H30 , &H4A , &H48 , &H4A , &H30 , &H00'Special charactersDot:Data &H00 , &H60 , &H60 , &H00 , &H00 , &H00Dash:Data &H18 , &H18 , &H18 , &H18 , &H00 , &H00Colon:Data &H00 , &H6C , &H6C , &H00 , &H00 , &H00Degree:Data &H00 , &H07 , &H05 , &H07 , &H00 , &H00Arrowright:Data &H41 , &H63 , &H36 , &H1C , &H08 , &H00Leftsquareparagraph:Data &H00 , &H7F , &H41 , &H41 , &H00 , &H00Rightsquareparagraph:Data &H00 , &H41 , &H41 , &H7F , &H00 , &H00Grid:Data &H55 , &H2A , &H55 , &H2A , &H55 , &H00Powerof:Data &H04 , &H02 , &H01 , &H02 , &H04 , &H00Underscore:Data &H40 , &H40 , &H40 , &H40 , &H40 , &H00Semicolon:Data &H00 , &H56 , &H36 , &H00 , &H00 , &H00Arrowleft:Data &H08 , &H14 , &H22 , &H41 , &H00 , &H00Equals:Data &H14 , &H14 , &H14 , &H14 , &H14 , &H00Question:Data &H02 , &H01 , &H51 , &H09 , &H06 , &H00Alpha:Data &H32 , &H49 , &H59 , &H51 , &H3E , &H00Exclamation:Data &H00 , &H00 , &H2F , &H00 , &H00 , &H00Quotation:Data &H00 , &H07 , &H00 , &H07 , &H00 , &H00Hash:Data &H14 , &H7F , &H14 , &H7F , &H14 , &H00Dollar:Data &H24 , &H2A , &H7F , &H2A , &H12 , &H00Percent:Data &HC4 , &HC8 , &H10 , &H26 , &H46 , &H00Ampersand:Data &H36 , &H49 , &H55 , &H22 , &H50 , &H00Apostrophe:Data &H00 , &H05 , &H03 , &H00 , &H00 , &H00Leftparagraph:Data &H00 , &H1C , &H22 , &H41 , &H00 , &H00Rightparagraph:Data &H00 , &H41 , &H22 , &H1C , &H00 , &H00Asterisc:Data &H14 , &H08 , &H3E , &H08 , &H14 , &H00Plus:Data &H08 , &H08 , &H3E , &H08 , &H08 , &H00Comma:Data &H00 , &H00 , &H50 , &H30 , &H00 , &H00Slash:Data &H20 , &H10 , &H08 , &H04 , &H02 , &H00Backslash:Data &H02 , &H04 , &H08 , &H10 , &H20 , &H00
Link to comment

cu un limbaj pe care in mare il mai si inteleg:

http://www.quantumtorque.com/content/view/32/37/ (Nokia 3310 si 5110)

http://www.microsyl.com/index.php/2010/03/24/nokia-lcd-library/ (schema+libraria pt lcd + un demo).

http://www.atmel.com/dyn/resources/prod_documents/doc2585.pdf (AVR SPI)

http://www.atmel.com/dyn/resources/prod_documents/AVR151.zip soft

http://www.edaboard.com/thread34903.html documentatie

http://www.elektroda.pl/rtvforum/topic1005166.html tot documentatie

http://www.instructables.com/id/Connecting-Nokia-3310-LCD-to-USB-using-AVR/step3/Soldering-it-together/ schema+librarie.

http://publicweb.unimap.edu.my/~azman/dokuwiki/doku.php?id=project:20050408-nokia3310lcd un proiect bunicel.

http://www.dharmanitech.com/2008/09/nokia-3310-lcd-interfacing-with-atmega8.html termometru

http://tinkerish.com/blog/?p=88 termometru&termistor

http://forum.lcdinfo.com/viewtopic.php?t=474&highlight=3310 conectarea LCD cu PCul prin portul paralel.

Driverul: pcd8544.gif[/attachment]

http://members.home.nl/remco.en.sandra/delphi.htm conectarea cu PCul + programarea in delphi

 

 

@biwak nu cauta exemple pt un anumit uC ... cateodata multumestete daca gasesti ceva pt AVR ..

linkurile de sus sunt rodul unei cautari pe google de vreo 10min .... daca se sapa mai adinc sigur gasesti o groaza de informatii, acest display este foarte raspandit printre amatori :da

Link to comment
  • 3 months later...
  • 1 month later...
Guest mateiuli

Salut,

 

Am realizat si eu aceasta schema http://tinkerish.com/blog/?p=88 , am pus softul in atmega insa imi sunt scrise unele caractere peste altele si nu pot intelege mai nimic. De ce face asa? Nu am facut absolut nimic gresit. Pur si simple ii dau sa scrie un text pe ecran si pe langa faptul ca unele litere sunt scrise peste altele, mai au si niste neregularitati.

 

Va rog mult, orice sfat e binevenit!

Link to comment

iulian2010, ti ti-a mers exact in configuratia asta montajul ?Eu l-am realizat practic cu un ATMEGA32, si m-am legat tot pe pinii D5-D7 si nu face nimic :(

Salut,Scuze pentru raspunsul foarte intarziat, doar acum am vazut intrebarea.Eu nu am realizat practic acest proiect, doar m-am jucat pe simulator in ISIS.Daca mai este de actualitate, da-mi un pm si o sa-ti dau documentatia despre acest proiect.Vezi si niste poze cu montajul de la cel care l-a realizat.
Link to comment
Guest mateiuli

Telefonul din care l-am desfacut inca mergea. Mai vechi dar mergea. Pe telefon scrie: "Made in Germany"Display-ul arata exact la fel ca cel pus iulian2010 in postul anterior. Exact la fel e.@iulian2010 - ai codul in c sau assambler? Daca e in C poti te rog sa pui aici doar libraria pe care ai folosit-o pentru LCD?Cu cea pusa in linkul din postul meu anterior imi afiseaza caracterele unele peste altele. Cu cea a lui Dharmani nemodificata de Michael imi afiseaza niste caractere extrem de ciudate pe tot ecranul - nicidecum ce ia-m dat eu sa afiseze. Nu stiu ca sa mai incerc...Mai am un nokia 3310 nou, nefolosit, dar nu vreau sa il stric si pe asta. Asta il mai folosesc din cand in cand...

Link to comment
Guest mateiuli

Imi cer mii de scuze dar a trecut ceva timp si nu mai pot edita mesajul anterior.

 

Am desfacut pana la urma si celalalt LCD si la asta nu mai apar punctele alea. Am reusit sa-l fac sa nu mai scrie peste, dar inca mai e o problema. Eu setez pozitia cursorului la (0,0) si incepe sa scrie pe linia 0 (asa i-am dat), dar nu incepe cu coloana 0 ci incepe mai de la sfarsitul liniei si continuarea pe linia urmatoare.

In bucla while unde citesc temperatura de la senzor si o afisez, de fiecare data se schimba linia cu una mai jos, desi eu ii dau de fiecare data in while sa se duca la pozitia (0,0) si sa scrie, insa el scrie de la sfarsitul liniei 0, continuarea pe lniia 1, si la urmatoarea iteratie, incepe cu linia 1 si continuarea pe linia 2 si tot asa se repeta.

 

Nu inteleg. Parca ar depinde pozitia curenta de cea de era inainte...

 

Asta e functia mea main:

int main(void){		//initializez	port_init();	spi_init();	LCD_init();	delay_ms(100);	LCD_clear();		LCD_gotoXY(0, 0);	LCD_writeString_F("Termometru");		LCD_gotoXY(0, 2);	LCD_writeString_F("Iulian");	delay_ms(3000);	LCD_clear();	LCD_gotoXY(0,0);		while(1)	    {			char x[20];		therm_read_temperature(x);			LCD_gotoXY(0,0);		LCD_writeString_F(x);					delay_ms(750);		//LCD_update();				LCD_clear();    }}
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Terms of Use si Guidelines