www.elektronik.si Seznam forumov www.elektronik.si
Forum o elektrotehniki in računalništvu
 
 PomočPomoč  IščiIšči  Seznam članovSeznam članov  SkupineSkupine  StatisticsStatistika  AlbumAlbum  DatotekeFilemanager DokumentacijaDocDB LinksPovezave   Registriraj seRegistriraj se 
  PravilaPravila  LinksBolha  PriponkePriponke  KoledarKoledar  ZapiskiZapiski Tvoj profilTvoj profil Prijava za pregled zasebnih sporočilPrijava za pregled zasebnih sporočil PrijavaPrijava 

Picbasic pro - pomoč

 
Objavi novo temo   Odgovori na to temo   Printer-friendly version    www.elektronik.si Seznam forumov -> Microchip PIC
Poglej prejšnjo temo :: Poglej naslednjo temo  
Avtor Sporočilo
YZY
Neznanec
Neznanec



Pridružen-a: Sre 02 Apr 2008 21:28
Prispevkov: 9
Aktiv.: 0.04
Kraj: Tolmin

PrispevekObjavljeno: Čet Apr 03, 2008 7:41 am    Naslov sporočila:  Picbasic pro - pomoč Odgovori s citatom

Ali mi lahko kdo pomaga predelat ta program za sledeči priklop LCDja?
' Prikljucitev LCD prikazovalnika:
' DB4 PortB.4 'Data'
' DB5 PortB.5 'Data'
' DB6 PortB.6 'Data'
' DB7 PortB.7 'Data'
' RS PortB.2 'Izbira podatek/ukaz'
' E PortB.3 'Dodaj 1.2k pull UP upor Enable'
' RW Ground 'Upor 1.2k pull DOWN'
' Vdd +5 volts 'Napajanje +5V DC'
' Vss GND 'Masa GND'
' Vo 20K trimer 'Osvetljitev glej manual'
' DB0-3 No connect 'Proste'


Tale program bi predelal:
' Program NO_CURS.BAS
'
' Disable the flashing cursor on the LCD

Device 16F84 ' We are using a PIC16F84

' ** Load the LCD Routines **
Include LCD
Init LCD,PortB ' Place the LCD on PortB

Symbol EN=B.3 ' Assign the LCD's RS line
Symbol RS=B.2 ' Assign the LCD's EN line

' *************** THE PROGRAM STARTS HERE****************

Define PortB %00000000 ' PortB all Outputs
Define PortA %00000000
Cls ' Clear the Display
Gosub Coff ' Disable the cursor
Cursor 1,2 ' Place TEXT on second line

Print "HELLO WORLD" ' Do the displaying
PortA=%11111111
Inf: Goto Inf ' Infinite loop

' ** Turn off the flashing cursor **
Coff: PortB=0 ' Place the first 4-bits on PortB
High EN ' Strobe the EN line High - Low
Clrwdt
Low EN
PortB=%11000000 ' Place the next 4-bits on PortB 11000000
High EN ' Strobe the EN line High - Low
Clrwdt
Low EN
Delayus (16) ' Pause for 40us with 4mHz OSC
High RS ' Back into character mode
Return ' Exit the subroutine

End ' Mandatory END statement
Nazaj na vrh
Odsoten Poglej uporabnikov profil Pošlji zasebno sporočilo
Pokaži sporočila:   
Objavi novo temo   Odgovori na to temo   Printer-friendly version    www.elektronik.si Seznam forumov -> Microchip PIC Časovni pas GMT + 2 uri, srednjeevropski - poletni čas
Stran 1 od 1

 
Pojdi na:  
Ne, ne moreš dodajati novih tem v tem forumu
Ne, ne moreš odgovarjati na teme v tem forumu
Ne, ne moreš urejati svojih prispevkov v tem forumu
Ne, ne moreš brisati svojih prispevkov v tem forumu
Ne ne moreš glasovati v anketi v tem forumu
Ne, ne moreš pripeti datotek v tem forumu
Ne, ne moreš povleči datotek v tem forumu

Uptime: 493 dni


Powered by phpBB © 2001, 2005 phpBB Group