![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
1. Use PIC16f877A annd 16x2 LCDLCD pin4 (RS) and 6(E) connected to PIC pin A4 and A5. LCD pin11 to 14 connected to PIC pin A0 to A3. Can I know should I initialise the port 1st before LCD display or before the code below? Code: void main ( void )
{
lcd_init();
while(1) {
lcd_gotoxy (1,1);
lcd_putc ("test" );
} // end while
}
| |
| |
| | #2 |
|
Hi, If your program code does not make use of the lcd R/W signal, then lcd Pin 5 R/W should be tied to 0v. | |
| |
| | #3 |
| Code: #include <16f877a.h>
#use delay (clock = 20000000)
#fuses NOWDT,NOPUT,HS,NOPROTECT
#include <LCD.C>
#define INTS_PER_10SECOND 153 // (4000000/(4*256*256*0.1))
BYTE ten_seconds; // A running seconds counter
BYTE int_count; // Number of interrupts left before ten second has elapsed
#int_rtcc // This function is called every time
void clock_isr() { // the RTCC (timer0) overflows (255->0).
// For this program this is apx 76 times
if(--int_count==0) { // per second.
++ten_seconds;
int_count=INTS_PER_10SECOND;
}
}
The code below is about interrupt and lcd display: Code: void main() {
BYTE start;
int_count=INTS_PER_10SECOND;
set_timer0(0);
setup_counters( RTCC_INTERNAL, RTCC_DIV_256 | RTCC_8_BIT);
enable_interrupts(INT_RB);
// enable_interrupts(GLOBAL);
while (TRUE)
{
set_tris_a(1);
lcd_init();
lcd_putc("\RPM:\n");
lcd_putc("++ten_seconds");
}
}
Anything wrong in the code above kindly correct me. Because its cannot display anything.. Thanks.. | |
| |
| | #4 | ||
| Quote:
If you look at the driver file LCD.c in your <C:\Program Files\PICC_vxxx\Drivers> folder you will see: Quote:
Is it possible to switch your LCD to Port D? This would be the easiest fix. I know that someone on the CCS forums has a driver for other ports, but that may be more difficult to understand, and I think you just need to get up and running at this point. regards | |||
| |
|
| Tags |
| project |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| electronics project for btech mini project | sujith123 | Electronic Projects Design/Ideas/Reviews | 13 | 17th July 2009 12:16 PM |
| project ideas for final year project! | AceOfHearts | Electronic Projects Design/Ideas/Reviews | 10 | 28th December 2008 12:25 PM |
| need suggestions on uni project. (mechatronics project) | konzen | General Electronics Chat | 16 | 13th March 2006 12:56 PM |
| i need a project idea\concept for a 10 month project..... | mackoy | General Electronics Chat | 3 | 22nd February 2005 12:27 AM |
| biomedical project(electronic project) | naguru | Electronic Projects Design/Ideas/Reviews | 1 | 2nd November 2004 12:08 PM |