Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD Problem

Status
Not open for further replies.

birdman0_o

Active Member
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 :D
 
Last edited:

Oznog

Active Member
Are you using the WDT?
 

birdman0_o

Active Member
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:

Mr RB

Well-Known Member
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.
 

birdman0_o

Active Member
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...
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top