Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 4th November 2009, 04:29 AM   #1
Default LCD Problem

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
PIC16F88...


Here is a video:

YouTube down for maintenance

Let me know if you need to see more of the code
__________________
Mike
My website: www.ElectroBird.net

Last edited by birdman0_o; 4th November 2009 at 04:32 AM.
birdman0_o is online now  
Old 4th November 2009, 04:46 AM   #2
Default

Are you using the WDT?
__________________
I thought what I'd do was I'd pretend I was one of those deaf-mutes.
Oznog is offline  
Old 4th November 2009, 04:53 AM   #3
Default

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
__________________
Mike
My website: www.ElectroBird.net

Last edited by birdman0_o; 4th November 2009 at 04:54 AM.
birdman0_o is online now  
Old 4th November 2009, 04:18 PM   #4
Default

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.
Mr RB is offline  
Old 4th November 2009, 05:23 PM   #5
Default

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...
__________________
Mike
My website: www.ElectroBird.net
birdman0_o is online now  
Old 4th November 2009, 09:42 PM   #6
Default

I put a 100nF capacitor accross the pic and it is now happy!
Wonder why...first time i've had this problem.
__________________
Mike
My website: www.ElectroBird.net
birdman0_o is online now  
Old 5th November 2009, 07:38 AM   #7
Default

Nasty power glitches... Are you driving a relay or something?
Mr RB is offline  
Old 5th November 2009, 03:29 PM   #8
Default

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.
__________________
Mike
My website: www.ElectroBird.net
birdman0_o is online now  
Reply

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



All times are GMT. The time now is 09:51 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker