Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

XC8- xlcd problem sa xlcd.h ?

[es] :: Elektronika :: Mikrokontroleri :: XC8- xlcd problem sa xlcd.h ?

[ Pregleda: 2388 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

mnn
sm

Član broj: 85435
Poruke: 723
*.dynamic.isp.telekom.rs.



+25 Profil

icon XC8- xlcd problem sa xlcd.h ?14.02.2015. u 20:55 - pre 110 meseci
Šta ovde nije dobro ili ja ne vidim ? U pitanju je Pic18f orginal include fajlovi .Umesto da mi displej piše po portu D on mi piše po portu B
Code:

/* PIC18 XLCD peripheral routines.
 *
 *   Notes:
 *      - These libraries routines are written to support the
 *        Hitachi HD44780 LCD controller.
 *      - The user must define the following items:
 *          - The LCD interface type (4- or 8-bits)
 *          - If 4-bit mode
 *              - whether using the upper or lower nibble
 *          - The data port
 *              - The tris register for data port
 *              - The control signal ports and pins
 *              - The control signal port tris and pins
 *          - The user must provide three delay routines:
 *              - DelayFor18TCY() provides a 18 Tcy delay
 *              - DelayPORXLCD() provides at least 15ms delay
 *              - DelayXLCD() provides at least 5ms delay
 */

/* Interface type 8-bit or 4-bit
 * For 8-bit operation uncomment the #define BIT8
 */
/* #define BIT8 */

/* When in 4-bit interface define if the data is in the upper
 * or lower nibble.  For lower nibble, comment the #define UPPER
 */
 #define UPPER 

/* DATA_PORT defines the port to which the LCD data lines are connected */
 #define DATA_PORT              PORTD
 #define TRIS_DATA_PORT         TRISD

/* CTRL_PORT defines the port where the control lines are connected.
 * These are just samples, change to match your application.
 */
 #define RW_PIN   LATDbits.LATD2         /* PORT for RW */
 #define TRIS_RW  TRISDbits.TRISD2        /* TRIS for RW */

 #define RS_PIN   LATDbits.LATD1          /* PORT for RS */
 #define TRIS_RS  TRISDbits.TRISD1        /* TRIS for RS */

 #define E_PIN    LATDbits.LATD3          /* PORT for D  */
 #define TRIS_E   TRISDbits.TRISD3       /* TRIS for E  */


Prikačeni fajlovi
 
Odgovor na temu

goran_68

Član broj: 89012
Poruke: 932
*.dynamic.isp.telekom.rs.



+81 Profil

icon Re: XC8- xlcd problem sa xlcd.h ?14.02.2015. u 21:07 - pre 110 meseci
Najverovatnije nisi uvukao ovaj fajl vec neki drugi. U ovom je na prvi pogled sve dobro.
gorankg
 
Odgovor na temu

bogdan.kecman
Bogdan Kecman
"specialist"
Oracle
srbistan

Član broj: 201406
Poruke: 15887
*.dynamic.sbb.rs.

Sajt: mysql.rs


+2377 Profil

icon Re: XC8- xlcd problem sa xlcd.h ?14.02.2015. u 23:10 - pre 110 meseci
iskopiraj taj fajl kod sebe u dir i nemoj da ga zoves xlcd.h nego mu daj svoje ime ... XC8 je velika budzevina (i C18 je bio) tako da sto rece kolega cesto uvuce default fajl umesto taj tvoj, posebno ako si ostavio default setovanje onda mu je njegov include svakako pre tvog
 
Odgovor na temu

zoran968
Beograd

Član broj: 252333
Poruke: 152
*.dynamic.isp.telekom.rs.



+1 Profil

icon Re: XC8- xlcd problem sa xlcd.h ?15.02.2015. u 10:40 - pre 110 meseci
Jeste, ovo je stari problem jos iz C18. Koliko neprospavanih noci, jer sam bio ubedjen da je dokumentacija ok i da je greska u meni. Dok nisam shvatio problem bio sam siguran da sam glup i da ja to ne mogu. Mogu samo da zamislim koliko je ljudi, pogotovo pocetnika, odustalo od mikrokontrolera zbog slicnih situacija, koje mogu da obeshrabre.
Zoran
 
Odgovor na temu

mnn
sm

Član broj: 85435
Poruke: 723
*.dynamic.isp.telekom.rs.



+25 Profil

icon Re: XC8- xlcd problem sa xlcd.h ?15.02.2015. u 14:22 - pre 110 meseci
Valjda je bilo do mene.Povlačio je svoj include.Proradio je .Hvala na sugestijama.
 
Odgovor na temu

[es] :: Elektronika :: Mikrokontroleri :: XC8- xlcd problem sa xlcd.h ?

[ Pregleda: 2388 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.