Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 26th October 2009, 05:34 PM   #16
Default

Yep, pins 1, 5, 7, 8, 9 & 10 on the LCD connector are all grounded.

My thoughts are:
a) I am selecting something wrong when saving the hex file (pic attached) or
b) LCD unit is faulty

The PIC controller is definately functioning, I have tested 2 units and other programs work fine.

I have made sure the power to the PIC is going through a regulator with 2 caps to make sure that its nothing to do with power. (I have heard of people having issues with PICs resetting if the Vdd is not isolated)

Is it possible that this particular PIC requires some other setting or code to get it to work?
Attached Thumbnails
mikroc lcd program-picflash_-screenshot.jpg  
dbutcher is offline  
Old 26th October 2009, 06:41 PM   #17
Default

Check my LCD interfacing code in mikroC here

Experiments with PIC16F628A: Experiment No. 3: LCD Interface in 4-bit Mode

- Raj
Experiments with PIC16F628A
rajbex is offline  
Old 27th October 2009, 12:31 PM   #18
Default

Thanks Be80be and Rajbex,

I've monitored traffic on all the pins used and the screen is reacting. All I am getting is a row of blocks on row 1 and 3. It is flashing on and off every 2 seconds or so (as you would expect from the code that Raj linked above).

I think I've come to the conclusion that my LCD is buggered. I've sent for another couple.

It is most frustrating, but thanks heaps for your suggestions.
dbutcher is offline  
Old 31st October 2009, 12:24 AM   #19
Default solution

Quote:
Originally Posted by einton View Post
hi guys finally i got the right program for mikroc pro ver2.25 which is atleast building

// Lcd pinout settings
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D4 at RB4_bit;

// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D7_Direction at TRISB7_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB4_bit;

void main() {
Lcd_Init();

TRISB = 0; // PORTB is output
// Initialize LCD connected to PORTB
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Turn cursor off
Lcd_Out(1, 1, "electronics"); // Print text to LCD, 2nd row, 1st column
}//~!

but there is no result on lcd , lcd is only lightning
i m using 50 K pot.
please tell what gona wrong.

include the library file for lcd...you can also ground th Vee pin in the lcd...
Sathiesh Kumar is offline  
Reply

Tags
lcd, mikroc, program

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Mikroc program problem einton Micro Controllers 7 22nd July 2009 12:20 PM
MMC with PIC18F4550 using MiKroC Nizar Micro Controllers 3 28th February 2009 02:14 PM
i need mikroC code ouranix Micro Controllers 0 21st February 2009 02:31 PM
PIC Programming in MikroC 00morrisd Micro Controllers 3 11th February 2009 10:22 PM
mikroC lib troubble Kryten Micro Controllers 17 28th May 2008 09:56 AM



All times are GMT. The time now is 05:08 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker