Hello everyone ;
I've been working on a project which requires an LCD display then I decided to get an oled in order to free some pins also to ease the PCB design
and I purchased an OLED code named EA W162-XBLW (ICEWHITE) of Electronic Assembly but I have a disturbing problem with the LCD .. After I power the circuit up I can perfectly display all the characters on whereever I want on the lcd but there is an incredible noise moving all around the LCD in a form of a pixel , So far I have tried using capacitors even those larger ones and even added the define LCD command and data line parameters with several tries ,, but no lock so far .. Here I share the code and a picture ... I hope any of you had such a weird problem in the past and solved it ...
The code is for 16F1827
Code:
#config
__CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_OFF & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF
__CONFIG _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_OFF & _BORV_19 & _LVP_OFF
#ENDCONFIG
'-------------------------------------------------------------------------------
define OSC 4
OSCCON=%01101010 'OSC is @ 4 MHZ
'------------- LCD DEFINES ------------------------
DEFINE LCD_DREG PORTB 'LCD data port
DEFINE LCD_DBIT 4 'LCD data starting bit 0 or 4
DEFINE LCD_RSREG PORTA 'LCD register select port
DEFINE LCD_RSBIT 7 'LCD register select bit
DEFINE LCD_RWREG PORTA ' LCD read/write port
DEFINE LCD_RWBIT 0 ' LCD read/write pin bit
DEFINE LCD_EREG PORTA 'LCD enable port
DEFINE LCD_EBIT 6 'LCD enable bit
DEFINE LCD_BITS 4 'LCD bus size 4 or 8
DEFINE LCD_LINES 2 'Number lines on LCD
'------------- LCD DEFINES -------------------------
'-------------------------------------------------------------------------------
PORTA=%00000000 : PORTB=%00000000
TRISA=%00000000 : TRISB=%00000000
'ADCON0=%00000001 : ADCON1=%10110000
ANSELA=%00000 : ANSELB=%00000000
'OPTION_REG.7=0
'-------------------------------------------------------------------------------
pause 500
lcdout $FE,$28
lcdout $FE,$17
lcdout $FE,$06
lcdout $FE,$08
lcdout $FE,$01
lcdout $FE,$02
lcdout $FE,$0C
MAIN:
lcdout $FE,$80,"BU BiR DENEMEDiR"
LCDOUT $FE,$C0," iKiNCi SATIR "
goto main
Bookmarks