![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Experienced Member Join Date: Mar 2008
Posts: 55
| I was attempting to connect up my very first lcd last night, i got the connected to the board, and loaded the code, and all the lcd show are 2 lines of solid blocks, i checked the code over and i cant seem to find the problem. I attached the code, is there something in it that im missing, its coded in swordfish se The led i have on the board is blinking so i know the processor is doing something. thanks josh |
| | |
| | #2 (permalink) |
| Experienced Member Join Date: Sep 2007 Location: Vancouver, B.C.
Posts: 903
| Well, I don't know that BASIC or how its libraries work, but two lines of solid blocks says to me that the LCD hasn't been initialized. 44780 LCD's do that when the power is turned on but they haven't been initialized. Look for an LCD init command of some kind.
__________________ ========================= Futz's Microcontrollers & Robotics ========================= |
| | |
| | #3 (permalink) |
| Experienced Member Join Date: Apr 2008 Location: Belgrade
Posts: 106
| two lines of solid blocks can also mean that contrast is not setupped properly.
__________________ http://www.it4um.com |
| | |
| | #4 (permalink) | |
| Experienced Member Join Date: Sep 2007 Location: Vancouver, B.C.
Posts: 903
| Quote:
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |
| | |
| | #5 (permalink) |
| Experienced Member Join Date: Mar 2008
Posts: 55
| i adjusted the contrast to that the line went away, im running the contrast pin thougth a 10 k pot as its all i have, this part seems to be working ok. I was looking at my code agian, could the pic be geing stuck in my first while loop, and just ignoring the rest of the code? I was loosely following the tutorial for spency's pic basic, the code was basically the same, i adjusted the clock, and option statements to meet my pin out and pic Last edited by joshua17ss2; 9th May 2008 at 03:06 PM. |
| | |
| | #6 (permalink) |
| Experienced Member Join Date: Apr 2008 Location: Belgrade
Posts: 106
| you can compile the code for 16F and run the hex trough http://www.oshonsoft.com/ pic simulator (it simulates the LCD also) .. as from the source code .. Code: ...
While True
LED = 1 // Turn on the LED
DelayMS(500) // Delay for half a second
LED = 0 // Turn off the LED
DelayMS(500) // Delay for half a second
Wend
... so in short, as your code is written, the DelayMS(150) will never be reached.
__________________ http://www.it4um.com |
| | |
| | #8 (permalink) | |
| Experienced Member Join Date: Apr 2008 Location: Belgrade
Posts: 106
| Quote:
__________________ http://www.it4um.com | |
| | |
| | #9 (permalink) | |
| Experienced Member Join Date: Jan 2007 Location: U.K.
Posts: 3,783
| Quote:
Look at this forum link: http://www.electro-tech-online.com/m...nds-reset.html
__________________ Eric "Good enough is Perfect" PIC tutorials: Nigel's site: http://www.winpicprog.co.uk/ Gramo's site: http://www.digital-diy.net/ | |
| | |
| | #10 (permalink) | |
| Experienced Member Join Date: Jun 2006
Posts: 180
| Quote:
software problem is likely to be solved here or there. Good Luck
__________________ Its what your friend in Your mind, what you in your friends mind | |
| | |
| | #11 (permalink) |
| Experienced Member Join Date: Mar 2008
Posts: 55
| with some slight tinkering to the wiring and the removal of the led flashing code, i got the data being displayed, just in case i ran out and bought a new pot to adjust my contrast and everything is working perfectly now. now i need to figure out how to have the chip multi tasking while displaying my infromation thanks for the help |
| | |
| | #13 (permalink) |
| Experienced Member Join Date: Oct 2007 Location: Sydney - Australia
Posts: 157
| Real time interupts are good for multi-tasking. Remember that there are certain timing requirements that need to be met when sending commands to the LCD module. There is a huge amount of info on this on the 'net. |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Problem with LCD code? | spondootre | Micro Controllers | 15 | 29th April 2008 09:15 AM |
| <--noob :) Need help with a Voltmeter/VU Bargraph Lcd display idea | Derick2k | Electronic Projects Design/Ideas/Reviews | 2 | 5th February 2008 10:39 PM |
| Substituting a 16x2 LCD display for 16x1 LCD display? | Dawny | Electronic Projects Design/Ideas/Reviews | 13 | 6th December 2007 01:41 PM |
| calculator | chinmay7 | Micro Controllers | 1 | 14th October 2007 12:45 PM |
| microchip application A590 /display is ok now | prosound90 | Micro Controllers | 20 | 18th November 2006 09:44 PM |