PIC Basic degree celsius symbol show LCD (°C)

วิธีแสดงเครื่องหมายองศาเซลเซียส (°C) บนหน้าจอ LCD

ตัวอย่างโปรแกรม

‘****************************************************************
‘*  Name    : degree.BAS                                           
‘*  Author  : HS3UKA                                           
‘*  Notice  : Copyright (c) 2013
‘*          : All Rights Reserved
‘*  Date    : 1/2/2013
‘*  Version : 1.0 
‘*  Notes   : http://www.hs3uka.com
‘****************************************************************
include “modedefs.bas”
define OSC 10
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG  PORTB
DEFINE LCD_EBIT 1

LCDOut $FE, $40,14,10,14,0,0,0,0,0 ‘ Create degree symbol in CGRAM

main:      
        lcdout $fe,$1, “HS3UKA”
        lcdout $fe,$C0,”Temp1:27.00″, 0, “C”
        lcdout $fe,$90,”Temp2:27.00″, 0, “C”
        lcdout $fe,$D0,”Temp3:27.00″, 0, “C”
        Pause 100
        
    GoTo main

 

degree

Facebook Comments