![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Hi there,
I used XLCD library in my C code, to display a message on LCD Display (2x16, with HD44780 LCD controller) using the PIC18F4525, I compilled the programm successfully, and made a schematic on ISIS in order to simulte it but, I failed to get anything to display !!! besides the PORTA0 which is configurated as DATA PORT remaind in low level during simulation, on the other hand PORTB (which is not used in my application) had varied level in its outputs (see joined picture). what is the resaon of this abnormality ? I have another question, does the ISIS LCD display include the HD44780 LCD controller , or should I add it from the libray the scheme?, if it's the cas how will I display ?? I joined my project compiled+ISIS simulation file+ a prints screen of ISIS schematic. thanks in advance. |
|
|
|
|
|
|
(permalink) |
|
Hi,
Not into C so cannot help you with the code, but the attached file does display correctly. No need to connect pins 1,2,3 - lcd pin5 R/W, if unused, is taken directly to 0v and not connected to the Pic. The display is the standard Isis library item. hth |
|
|
|
|
|
|
(permalink) |
|
Ops,
Should have said that the standard Isis lcd does include the HD44780 controller. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
thanks for answering me, I disconnected pins 1, 2, 3 (why doing this ?) and R/W from PIC, but nothing has changed !! |
||
|
|
|
|
|
(permalink) |
|
Hi,
Pins 1,2,3 are taken care of by Isis as a standard connection. The Isis design should work - but not knowing C cannot help directly. From my experiences with assembler LCD code, the slightest error and nothing works - its always a difficult routine to set up. Do a search on this forum for 'C and LCD' for previous similar questions. Also, give it a few more hours for the Earth to spin around - sure others will soon help you with this problem |
|
|
|
|
|
|
(permalink) |
|
here is the isis schematic with hex file that works
it is standard text lcd as for the code .. I use mikroC mostly and it has libraries for lcd etc.. Code:
void main(){
Lcd_Init(&PORTD);
Lcd_Cmd(Lcd_CLEAR);
Lcd_Cmd(Lcd_CURSOR_OFF);
Lcd_Out(1, 1, "LCD Test");
Lcd_Out(2, 1, "1234567890123456");
while(1){ asm {nop} }
}
__________________
http://www.it4um.com Last edited by arhi; 10th May 2008 at 08:28 PM. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) | |
|
Quote:
hi arth, firstly, thank tou for helping me with this code + simulation file secondly, it seems to be much less complicated than XLCD library and files, but I can't change from it cause I'm using MPLAB enviorement and hence C18 compiler of Microchip for beter compatibilty. |
||
|
|
|
|
|
(permalink) | |
|
Quote:
Look for some LCD examples in C18, and get them to work first. ISIS is a big help there as it can simulate the whole circuit .. attach a graph to whole PORTD and run your software, maybe you connected it wrong (maybe you should use D4-D7 and not D0-D3 )
__________________
http://www.it4um.com |
||
|
|
|
|
|
(permalink) | |
|
Quote:
Concerning ISIS, this soft does not simulate corretly with some components/circuits, here is an exemple I've faced and you can try it by yourself: the ULN2083 seems to be a faulty component, I tried several times to command relays with it, but despite the circuits were correct I wasn't able to excite the coil and turn on the relay. Last edited by loup-garou; 10th May 2008 at 09:17 PM. |
||
|
|
|
|
|
(permalink) |
|
I do not have ULN2083 in ISIS, only ULN2001/2002/2003/2004 so I cannot try ... and those 4 simulate ok.
__________________
http://www.it4um.com |
|
|
|
|
|
|
(permalink) | |
|
Quote:
I'll be very pleased, if you send me the simulation file of one of those ULN ! |
||
|
|
|
|
|
(permalink) | |
|
Hello;
I had the same problems, I will upload a C18 LCD project that should get you back on track , but can't do it right know. Check back later or tomorrow. -=Bryan=- Quote:
|
||
|
|
|
|
|
(permalink) | |
|
Quote:
__________________
http://www.it4um.com |
||
|
|
|
|
|
(permalink) | |
|
Quote:
__________________
http://www.it4um.com |
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| PWM on 18F4525 | futz | Micro Controllers | 6 | 10th May 2008 04:49 AM |
| serial ports not working... | simrantogether | General Electronics Chat | 23 | 22nd September 2007 06:29 PM |
| Working with household mains cables (not flex) | SimonW | General Electronics Chat | 4 | 1st February 2007 01:11 AM |
| faulty digital components testing,checking | walters | General Electronics Chat | 5 | 22nd August 2005 07:10 PM |
| Working Summing Amplifier Simulation? | petesmc | General Electronics Chat | 2 | 25th November 2003 07:01 AM |