Comme prévu voilà des tests du circuit Digole pour afficheur LCD en remplacement du circuit à base de PCF5474.
https://www.digole.com/index.php?productID=551
Pas de problème pour le remplacement du circuit.
Premier test avec la liaison série et l'instruction serout :
https://www.digole.com/index.php?productID=551
Pas de problème pour le remplacement du circuit.
Premier test avec la liaison série et l'instruction serout :
Code:
#PICAXE 28X2
#no_table
'LCD 20x4
'test avec serout
symbol tx=B.1
'*** test 8MHz 9600Bd ***
'*** test taille écran
serout tx,T9600_8,("CL") ;clear
for b0=1 to 80
serout tx,T9600_8,("TTX",0) ;remplir avec des X (16x2 par defaut)
next b0
serout tx,T9600_8,("STCR",20,4,$80,$C0,$94,$D4) ;config en 20x4
pause 1000 ;NEW LCD:2004 s'affiche
serout tx,T9600_8,("CL") ;clear
for b0=1 to 80
serout tx,T9600_8,("TTX",0) ;remplir avec des X
next b0
'*** config non volatile
'*** test retro éclairage
serout tx,T9600_8,("BL0") ;eteindre
pause 1000
serout tx,T9600_8,("BL1") ;allumer
pause 1000
serout tx,T9600_8,("BL",0) ;eteindre
pause 1000
serout tx,T9600_8,("BL",1) ;allumer
'*** les 2 solutions fonctionnent
'*** test reglage intensité
for b0=0 to 100
serout tx,T9600_8,("BL",b0)
serout tx,T9600_8,("TP",0,0,"TT",#b0,0) ;position : lignes et colonnes commencent à 0
pause 100
next b0
'*** pb avec 48 et 49, code ascii 0 et 1
'*** test curseur
serout tx,T9600_8,("CS0") ;eteindre
pause 1000
serout tx,T9600_8,("CS1") ;allumer
pause 1000
serout tx,T9600_8,("CS",0) ;eteindre
pause 1000
serout tx,T9600_8,("CS",1) ;allumer
'*** les 2 solutions fonctionnent
'*** test affichage config à la mst
serout tx,T9600_8,("DC0") ;pas d'affichage après mst
serout tx,T9600_8,("DC1") ;UART baud:9600 après mst
serout tx,T9600_8,("DC",0) ;pas d'affichage après mst
serout tx,T9600_8,("DC",1) ;UART baud:9600 après mst
'*** les 2 solutions fonctionnent
'*** test 64MHz 38400Bd ***
serout tx,T9600_8,("TP",0,0,"TTDEBUT TEST 38400",0)
serout tx,T9600_8,("SB38400",13,10) ;config 38400Bd
setfreq em64
pause 800
serout tx,T38400_64,("CL") ;clear
pause 8000
for b0=1 to 80
serout tx,T38400_64,("TTX",0) ;remplir avec des X
next b0
pause 8000
serout tx,T38400_64,("TP",0,3,"TTFIN TEST 38400",0)
pause 8000
serout tx,T38400_64,("SB9600",13,10) ;config 9600Bd
setfreq m8
pause 500
'serout tx,T9600_8,("TP",0,0) ;élimine le bug
serout tx,T9600_8,("TP",0,0,"TTRETOUR A 9600",0) ;positionnement pas pris en compte ?
serout tx,T9600_8,("TP",0,1,"TTRETOUR A 9600",0) ;positionnement pris en compte
'*** problème de postionnement après changement de vitesse