Author |
Message |
Topic: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1
Replies: 14
Views: 21373
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 6:54 pm Subject: Problem of single line of black squares on LCD 1602(16*2) |
This schematic shows the crystal circuit that you need:
http://s21.postimg.org/gkrbc1cav/schema002.jpg
Crystal X1 can be a 4 MHz or 20 MHz crystal, whatever you have in stock.
The two capacitors sh ... |
Topic: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1
Replies: 14
Views: 21373
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 10:35 am Subject: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1,
Your schematic in your original thread shows no crystal oscillator
circuit external to the 16F877. Proteus doesn't care about this.
But in real hardware, this circuit is necessary. ... |
Topic: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1
Replies: 14
Views: 21373
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 8:50 am Subject: Oh that's too bad!!!I shouldn't have trust proteus |
OK...
Sounds like you have a bad installation of MPLAB.
You should have seen 'release' and 'debug' as the options for the 'build configuration' in the 'project' drop down window.
I'd remove and ... |
Topic: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1
Replies: 14
Views: 21373
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 6:41 am Subject: Problem of single line of black squares on LCD 1602(16*2) |
1) trimpot doesn't get connected to 15 and 16. that's 'usually' the LED backlighing connections....trimpot get connected to pin 3(contrast +-.5VDC)
2) I use the PICKit3 to program the 877 all the t ... |
Topic: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1
Replies: 14
Views: 21373
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 5:28 am Subject: Change to a simple one,but it still got the same error. |
step number 1. Get rid of 99% of your code and ONLY code for the LCD module! Just create a simple 'Hello LCD' program. Confirm your LCD is properly connected,code uses the correct I/O pins,etc.
Show ... |
Topic: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1
Replies: 14
Views: 21373
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 5:27 am Subject: Change to a simple one,but it still got the same error. |
step number 1. Get rid of 99% of your code and ONLY code for the LCD module! Just create a simple 'Hello LCD' program. Confirm your LCD is properly connected,code uses the correct I/O pins,etc.
Show ... |
Topic: Problem of single line of black squares on LCD 1602(16*2) |
HWGonly1
Replies: 14
Views: 21373
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 4:03 am Subject: Problem of single line of black squares on LCD 1602(16*2) |
Hi, experienced programmers, I come for help for the second time.
I'm working on PIC16F877 while the LCD only display a single line of black squares.
I've already add delay_ms(500) before and after ... |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 8:36 pm Subject: Your comment is right what works in mine,thank you!!! |
This is a schematic of how you should connect the pushbutton, per
Ttelmah's description:
+5v
|
<
> 4.7K
< ... |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 8:33 pm Subject: Thank you for offering me a helpful hand!!! |
also you'll probably need to add a small 'filter' cap across the switch contacts to minimize the 'bounce' or you'll get multiple inputs!
hth
jay |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 8:33 pm Subject: Thank you very much, I've already solved my problem!Thanks!! |
Think.
You are programming the interrupt to trigger when the pin goes high to low.
The pin needs to be pulled _high_ when the button is not pressed, and then pulled _low_ by the button.
So t ... |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 5:21 am Subject: Question about LCD display (most likely to be interrupts) |
As I said:
"Then the button input, and (possibly) the odometer pulse (if this is what it is), will need pull-up resistors."
A button on it's own, won't generate a signal the PIC can se ... |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 5:11 am Subject: Question about LCD display (most likely to be interrupts) |
As I said:
"Then the button input, and (possibly) the odometer pulse (if this is what it is), will need pull-up resistors."
A button on it's own, won't generate a signal the PIC can se ... |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 4:50 am Subject: Question about LCD display (most likely to be interrupts) |
Thank you very much for rewrite the code for me. However it's still troubling with just display "Vacant car".
Seems the #int_ext still don't work.
Do you have any idea,I'm sure my simulati ... |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 3:18 am Subject: Thank you very much, I know there are many advantage with my |
Thank you very much, I know there are many disadvantage with my program.
I have correct them but it still doesn't change what LCD display.
LCD keep displaying "Vacant" whatever i ... |
Topic: Question about LCD display (most likely to be interrupts) |
HWGonly1
Replies: 15
Views: 21696
|
Forum: General CCS C Discussion Posted: Wed Jul 02, 2014 10:40 pm Subject: Question about LCD display (most likely to be interrupts) |
#include"flex_lcd.c"
int count=0;
int RunMilege=0;
int mode=0;
int flag=1;
unsigned long Price;
int hun;
int ten;
int one;
void price1()
{
int TotalPrice;
if(RunMileg ... |
|