Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem lcd with pic4550
03-12-2013, 11:35 PM,
#1
Problem lcd with pic4550
Hello penguin community ..

I am currently working on a penguin plate with PIC18F4550 to 20Mhz, but take the example of LCD, the RUN LED starts flashing pictures alone are shown in the first row of the LCD. I have ridden other projects with leds and a servomotor and have worked without problem, the RUN LED remains lit without blinking but the LCD does not work with me. I have looked in many places and I have not managed to find the solution. I appreciate your help.

This is the code of the example ...

void setup() {
// initialize the library with the numbers of the interface pins
//lcd.pins(RS, E, D4, D5, D6, D7, 0, 0, 0, 0); //4bits
//lcd.pins(RS, E, D0, D1, D2, D3, D4, D5, D6, D7); //8bits
lcd.pins(12, 11, 5, 4, 3, 2, 0, 0, 0, 0); // Use last 4 pins as zero for 4bits mode

// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Hello, World!");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.printf("Pinguino: %d", millis()/1000);

delay(100);
}
Reply
04-12-2013, 07:04 PM,
#2
RE: Problem lcd with pic4550
Your example works perfect for me ...
Are you sure your LCD has been connected the proper way ?
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
04-12-2013, 09:18 PM,
#3
RE: Problem lcd with pic4550
(04-12-2013, 07:04 PM)regis Wrote: Your example works perfect for me ...
Are you sure your LCD has been connected the proper way ?

Thanks for your response.

Yes because the same lcd, work with in arduino without problems. But when I, burn the PIC, and LED RUN flashes. seems as if the PIC will restart.
Reply
04-12-2013, 09:33 PM,
#4
RE: Problem lcd with pic4550
Uhmm...

replace
lcd.printf("Pinguino: %d", millis()/1000);

with this line
lcd.print("Pinguino:");

and after replace with:
lcd.printNumber(millis() /1000 ,10);

News?
Reply
04-12-2013, 10:17 PM,
#5
RE: Problem lcd with pic4550
(04-12-2013, 09:33 PM)psteve Wrote: Uhmm...

replace
lcd.printf("Pinguino: %d", millis()/1000);

with this line
lcd.print("Pinguino:");

and after replace with:
lcd.printNumber(millis() /1000 ,10);

News?
Thanks for your response.

I replaced the line, but the RUN LED continuous, flashing. If only I burned the string "hello word" the RUN LED flashing again and not stopped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)