![]() | ![]() | ![]() |
| |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
![]() |
| | Tools |
| | #1 |
|
I'm designing a project to interface with my car to extract certain information to analyze. I've created a PCB for the project, and have the majority of the code written, however, i'm having issues. On my development board, i have no trouble initializing the LCD screen that i've purchased.... using PIC16f877A.... my circuit uses PIC16F688.. On my circuit, the LCD will not initialize, using the same code from the 877. I was wondering if it's a software issue, or a hardware issue, and if i'm going about the whole thing wrongly. ![]() that is the top down view of the LCD portion of my board (the power is on another layer).... ive assigned the following pins: LCD <> PIC D7 C5 D6 C4 D5 C3 D4 C2 D3 gnd D2 gnd D1 gnd D0 gnd E C1 Rw gnd Rs C0 and set the following tags: ADCON1 := 0; // no analog >< digital conversions ANSEL := 0; // no analog inputs ADCON0 := 0; // no analog >< digital conversions CMCON0 := 7; // no comparators TRISA := 2; // all but pin 2 is output TRISC := 0; // all outputs on port C help? | |
| |
| | #2 |
|
Is that Pascal? Also I read somewhere leave the 4 unused data pins on the LCD floating. Your layout seems to be missing many traces.
| |
| |
| | #3 |
|
It looks like Pascal ... Not many pascal pic compilers around so I assume you use mikroPascal for PIC. If you are, pay attention that you change in your project settings the MCU type (it is 16F877A by default) to 16F688 and recompile the code. Also, if you are using built in functions to access lcd do not forget to config the LCD library as by default D port is used, for you setup it should be something like: Lcd_Config(&PORTC, 0, 1, 7, 5, 4, 3, 2); If you do not execute Lcd_Config() the default port used is PORTD as that is where LCD is connected on easypic
__________________ Bits From Bytes - the best RepRap kit out there now featuring RepRap V3 with full electronics redesign based on PIC32MX440F256H (English) MySQL Blog (Serbian) Elco Blog (Serbian) Use forum to ask questions, do not use PP | |
| |
| | #4 | |
|
Ahh A person also using ME's Pascal arhi: Hit it on the nose most likely, damn that edit project screen! I bet it was an easypic5 like mine, which would make it Lcd_Config(PORTB, 3, 2, 1, 0, PORTB, 4, 6, 5); I have to agree, your missing some traces there. It's hard to say cause we know nothing about the other parts. Even using 4 bit mode, you would still have like 7 or so. -BaC Quote:
__________________ Error[888] "while trying to load":[reality.sh] kernel: [Panic!]...{Universe has been Modified!}... Last edited by BaCaRdi; 4th May 2008 at 04:10 AM. | ||
| |
| | #5 | |
|
@bacardi I actually use MikroC and not Pascal (and easypic4 as 5 is pretty new, what can I say, the mikroelektronika workshop is 10min drive from my house) but I presume they are pretty same on the "edit project" note .. anyhow if he connected the pins as he wrote .. Quote:
Lcd_Config(PORTC, 0, 1, 7, 5, 4, 3, 2); also, he should check the syntax as in mikroC there is Code: void Lcd_Custom_Config(char * data_port, char db3, char db2, char db1, char db0, char * ctrl_port, char rs, char ctrl_rw, char enable); Code: void Lcd_Config(unsigned short *port, unsigned short RS, unsigned short EN, unsigned short WR, unsigned short D7, unsigned short D6, unsigned short D5, unsigned short D4); there is lcd8... for 8bit interface but I do not see any reasons for using it
__________________ Bits From Bytes - the best RepRap kit out there now featuring RepRap V3 with full electronics redesign based on PIC32MX440F256H (English) MySQL Blog (Serbian) Elco Blog (Serbian) Use forum to ask questions, do not use PP | ||
| |
| | #6 | |
| Quote:
the only traces not shown on my circuit board are the power/contrast, which i haven't included pin the picture, i know those work, the LCD turns on, but i can't get commands to it. I've got 4 data lines, the E, and the Rs going to the PIC, for a total of 6, i don't use the Rw, since i'll never read from it, i've just grounded that one, as well as the unused data pins. and i have done EDIT project and changed those settings... i use an external clock @ 20mhz | ||
| |
| | #7 |
|
You're missing all your power and gnd pins, no 0.1uf decoupling caps (you'll see the all over your EasyPIC PCB) The contrast pot isn't there. GND the RW line on the LCD... How are you powering it?
| |
| |
| | #8 | |||
| Quote:
Really?.... No... Really? Lithium381: Quote:
Quote:
| ||||
| |
| | #9 | |
| Quote:
__________________ Steve | ||
| |
| | #10 | |
| Quote:
.. If you ground the contrast line the LCD will be either too light (you will not see anything on it even if it is actually showing the txt) or you will only see black boxes instead of the txt. So you *have to* use the contrast pot to get the display to show the txt. Try it on the easypic, if you turn the embedded contrast pot to max or min you'll see that there is nothing on the lcd.
__________________ Bits From Bytes - the best RepRap kit out there now featuring RepRap V3 with full electronics redesign based on PIC32MX440F256H (English) MySQL Blog (Serbian) Elco Blog (Serbian) Use forum to ask questions, do not use PP | ||
| |
|
| Tags |
| helppic, herelooking, post |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Where should I post to get cct design help ? | scottb721 | General Electronics Chat | 3 | 13th March 2007 06:15 PM |
| Why cant I post? | Rolf | Feedback/Comments | 15 | 27th October 2006 05:41 PM |
| LEDs 2nd Post. | RayH | General Electronics Chat | 2 | 19th April 2005 02:47 AM |
| All newbies should read before post | TheOne | General Electronics Chat | 1 | 19th January 2005 07:03 PM |
| First Post, Basic Questions ... | budidharma | General Electronics Chat | 11 | 21st November 2004 04:41 AM |