![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
Hey guys, what in this code do you think would make my LCD reset "frequently" Code: Call LCD_Line1 MOVLW 'T' Call LCD_Char MOVLW 'e' Call LCD_Char MOVLW 'm' Call LCD_Char MOVLW 'p' Call LCD_Char MOVLW 'e' Call LCD_Char MOVLW 'r' Call LCD_Char MOVLW 'a' Call LCD_Char MOVLW 't' Call LCD_Char MOVLW 'u' Call LCD_Char MOVLW 'r' Call LCD_Char MOVLW 'e' Call LCD_Char MOVLW ':' Call LCD_Char CALL LCD_Line2 MOVLW ' ' Call LCD_Char MOVF Thou,W ; Call LCD_CharD MOVF Hund,W ; Call LCD_CharD MOVLW '.' Call LCD_Char MOVF Tens,W ; Call LCD_CharD MOVLW ' ' Call LCD_Char MOVLW b'11011111' Call LCD_Char MOVLW 'C' Call LCD_Char Call Delay255 Call Delay255 Call Delay255 Call Delay255 Call Delay255 Call Delay255 GOTO Main Here is a video: YouTube down for maintenance Let me know if you need to see more of the code Last edited by birdman0_o; 4th November 2009 at 04:32 AM. | |
| |
| | #2 |
|
Are you using the WDT?
__________________ I thought what I'd do was I'd pretend I was one of those deaf-mutes. | |
| |
| | #3 |
|
Nope, I have a feeling I might need to post my whole code >.> Code: List P=16F88 #include "P16F88.INC" __CONFIG _CONFIG1, _PWRTE_ON & _WDT_OFF & _INTRC_IO & _BODEN_OFF & _LVP_OFF & _CP_OFF & _MCLR_OFF __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF Last edited by birdman0_o; 4th November 2009 at 04:54 AM. | |
| |
| | #4 |
|
Its probably the table read trying to read an illegal value, ie too high, so it jumps out of code and continues to the end where it loops back to 0x000 and gives the impression of a reset. In your LCD_Char function, put a correct for illegal char so if w contains a char that is too high the table read is constrained to the last table entry or better still displays an error character on the LCD. | |
| |
| | #5 |
|
I dont actually have a table though. The orginal code I posted is part of my main loop. It's a brute force attack which I will fix tonight. So that it does not reprint the "Temperature:" so much...
| |
| |
| | #6 |
|
I put a 100nF capacitor accross the pic and it is now happy! ![]() Wonder why...first time i've had this problem. | |
| |
| | #7 |
|
Nasty power glitches... Are you driving a relay or something?
| |
| |
| | #8 |
|
Nope and its weird, because I have other things attached too and they work. Furthermore I have a big fat cap accross the power rails.
| |
| |
|
| Tags |
| lcd, problem |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| LCD backlight problem? inverter problem? SHARP | dirtyb15 | Repairing Consumer Electronics | 32 | 27th October 2009 12:49 PM |
| Lcd Problem | sachin.kolkar | Micro Controllers | 9 | 12th July 2008 05:29 AM |
| LCD problem | Night Rider | Micro Controllers | 19 | 10th April 2008 06:24 PM |
| lcd problem | kimsiang85 | Micro Controllers | 21 | 10th April 2008 12:41 PM |
| I have a problem with my LCD | Emmanuel Akowuah | Electronic Projects Design/Ideas/Reviews | 1 | 11th August 2003 05:18 PM |