Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hello
how can set up a lcd 16*2 with 4-bit Interface in Mplab?Does it have any library?
Thanks
3.2 EXTERNAL LCD FUNCTIONS
These functions are designed to allow the control of a Hitachi HD44780 LCD controller
using I/O pins from a PIC18 microcontroller. The following functions are provided....
The Microchip Application Maestro™ Software is a stand-alone software tool to configure and incorporate a range of pre-written firmware modules into your applications. Its heart is a collection of modules developed by Microchip Technology for use with its PICmicro devices. Starting from a graphic interface, select one or more available modules, then configure the parameters listed. When this is complete, the Application Maestro Software generates code that can be incorporated into the application project, using MPLAB® IDE or any compatible development environment.
It is important to note that the Application Maestro Software is not a plug-in or add-on to the MPLAB line of development tools.
Application Maestro Software also differs from other librarian systems because it does more than archive and manage related files for a single software project. Instead, it manages a library of ready-to-configure modules that can be customized to the application, and creates the necessary files for inclusion in the project on demand.
Application Maestro Software is a repository of pre-written software solutions that are optimized for the many peripheral features of Microchip controllers. It is no longer necessary to spend hours digging through code archives or documentation, trying to find the source code for an RS-232 serial communication port or CAN engine, then manually adding it to a new project. Nor do you have to re-invent a block of application code when you can’t find that one elusive archive. With the Application Maestro Software, it’s all in one place.
Features
Currently Maestro has these modules:
I2C Slave for PIC16/PIC18
Simple CAN Bootloader for PIC18
RTC for PIC16 family
10-bit ADC polled for PIC18
10-bit ADC interrupt for PIC18
Can driver with prioritized transmit buffer
I2C Master for PIC16/PIC18
SPIMaster for PIC16/PIC18
USART for PIC16/PIC18
Simple SRAM Dynamic Memory Allocation
EUSART based for PIC18
ECAN routtines for PIC18+ECAN
DeviceNet Group 2 Slave for PIC18
CAN from PIC18Fxx8
LCD C routines for PIC18
LCD routines for PIC16/PIC18
SPISlave for PIC16/PIC18
Oversampling module for PIC16/PIC18
Dear avineshb006@gmail.com
could you explain more how can i do that? if i send this command , how can send the date and what is the procedure?
I work with 18F452 and C is my programming Language
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 #include <p18f4520.h> #include <delays.h> #define _XTAL_FREQ 10000000 //LCD (PortD) #define E LATDbits.LATD6 #define R_W LATDbits.LATD5 #define RS LATDbits.LATD4 #define LCDdata LATD void command(unsigned char); void write(unsigned char); void Nybble(unsigned char); void init(void); void PutMessage(rom char *); void main() { while(!OSCCONbits.IOFS); //wait for osc stable ADCON1 = 0x0F; //make RA0 digital //data direction registers all 0's mean that all pins are set to output //all 1's means that all of the pins are set to operate as inputs TRISA = 0x00; TRISB = 0x00; TRISD = 0x00; init(); PutMessage("Hello World!"); command(0xc0); PutMessage("WELCOME"); while(1); } //Write a string to the LCD void PutMessage(rom char *Message) { rom char *Pos = Message; while(*Pos!=0) write(*Pos++); } /**********************************************************/ //4-bit methods for LCD /**********************************************************/ void command(unsigned char i) { RS =0; R_W =0; //R/W=LOW : Write Nybble(i>>4); //Send upper 4 bits Nybble(i); //Send lower 4 bits Delay1KTCYx(2); //must wait at least 2mS (2*1000*4/1e6 = 8ms used) } void write(unsigned char i) { RS =1; R_W =0; //R/W=LOW : Write Nybble(i>>4); //Send upper 4 bits Nybble(i); //Send lower 4 bits Delay1KTCYx(2); //must wait 2mS } /**********************************************************/ void Nybble(unsigned char dat) { dat &= 0x0f; //clear top bits of dat LCDdata &= 0xf0; //clear bottom bits of port (interested only in DB7-DB4) LCDdata |= dat; //or the two and store at port E = 1; Delay1TCY(); //enable pulse width >= 300ns (used 4uS) E = 0; //Clock enable: falling edge } /**********************************************************/ void init(void) { LCDdata=0x00; Delay1KTCYx(15); //Wait >15 msec after power is applied (used 20mS) Nybble(0x3); //command 0x30 = Wake up Delay1KTCYx(5); //must wait 160us, busy flag not available (used 160uS) Nybble(0x3); //command 0x30 = Wake up #2 Delay1KTCYx(5); //must wait 160us, busy flag not available (used 160uS) command(0x20); //Function set: 4-bit/2-line command(0x2c); //Function set: 4-bit/2-line command(0x10); //Set cursor command(0x01); //Clear Display (Added) command(0x06); //Entry Mode set command(0x0c); } /**********************************************************/ //End methods for LCD /**********************************************************/