Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing 2x16 LCD with DSpic33FJ64GS610

Status
Not open for further replies.

tictac

Full Member level 5
Joined
Oct 22, 2006
Messages
297
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
Polland
Activity points
3,572
Hi
I am new in DSPIC33 . before I use character LCD for my project with AVR.
Now I want to interface 2x16 LCD with DSpic33FJ64GS610. As you know in this DSC the place of one port is not at one place . (for example RA0-->Pin17 , RA1-->pin38)
So for easy making PCB for my circuit I want to connect LCD's pins to the DCS's Pins that are placed side by side. I want to use MPlab for writing the codes. Does it makes a problem for coding? Does LCD library in MPlab supports this form of lcd connection ?

Regards.
 

Check out C30 compiler documentation.

If you did default install of C30 it will be here:

C:\Program Files\Microchip\MPLAB C30\docs\periph_lib\.........XLCD_Help.htm

There is a section that states:

Control I/O pin definitions
RW_PIN PORTxbits.Rx?
TRIS_RW TRISxbits.Rx?
RS_PIN PORTxbits.Rx?
TRIS_RS TRISxbits.Rx?
E_PIN PORTxbits.Rx?
TRIS_E TRISxbits.Rx?
where x is the PORT, and ? is the pin number.

Data pin definitions
DATA_PIN_? PORTxbits.RD?
TRIS_DATA_PIN_? TRISxbits.TRISD?
where x is the PORT, ? is the pin number

The Data pins can be from either one port or from multiple ports. The control pins can be on any port and are not required to be on the same port. The data interface must be defined as either 4-bit or 8-bit.

The 8-bit interface is defined when a
#define EIGHT_BIT_INTERFACE is included in the header file xlcd.h. If no define is included, then the 4-bit interface is included. After these definitions have been made, the user must compile the application code into an object to be linked.

This function also requires three external routines for specific delays:
DelayFor18TCY() 18 Tcy delay
DelayPORXLCD() 15ms delay
DelayXLCD() 5ms delay
Delay100XLCD() 100Tcy delay
So it seems that you can do what you want to do.
 
  • Like
Reactions: tictac

    tictac

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top