Jump to content

JirkaA

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JirkaA

  • Rank
    Newbrie
  1. Mea culpa, everything is working after switching LVP OFF.
  2. Carefuly read first quoted sentence from comment.. You have wrong connected LCD module to port. There is correct connection: // RS to RA0 // R/W to RA1 // E to RA2 // DB0 to GND // DB1 to GND // DB2 to GND // DB3 to GND // DB4 to RC0 // DB5 to RC1 // DB6 to RC2 // DB7 to RC3 So i have one newbie question about LCD interfacing too. I have one equipment with LCD connected this way: //RS to RB4 //E to RB5 //R/W to GND (since i use timing with delay, no reading from LCD required) //RB0-RB3 are used for DB4-DB7 I hope that LCD library from boostC can be used with data and controls driven both from portB, because there is not possible to make any changes in HW design. Have anyone tried similar configuration? First tests look, that LCD is not initialised so there is something wrong.. Sample test code: #pragma CLOCK_FREQ 20000000 #include <system.h> #include "statusterm.h" #define LCD_ARGS 1, /* Interface type: mode 0 = 8bit, 1 = 4bit(low nibble), 2 = 4bit(upper nibble) */ \ 0, /* Use busy signal: 1 = use busy, 0 = use time delays */\ PORTB, TRISB, /* Data port and data port tris register */ \ PORTB, TRISB, /* Control port and control port tris register */ \ 4, /* Bit number of control port is connected to RS */ \ 6, /* Bit number of control port is connected to RW */ \ 5 /* Bit number of control port is connected to Enable */ #include <lcd_driver.h> // include the LCD template code #pragma DATA _CONFIG, _CP_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC void main() { trisb = 0; portb = 0; adcon1 = 00001110b; lcd_setup(); while (1) { lcd_clear(); delay_s(1); lprintf( "Test" ); delay_s(1); } } Thank you for ideas.
×
×
  • Create New...