標題: RGB Bascom [打印本頁] 作者: AlirezaGhh 時間: 2020-7-18 20:15 標題: RGB Bascom Hello friends
there is a project addvance for lcd rgb with bascom avr
you can use many affact
Dim I As Word, X As Word
Dim R_p As Bit, R_n As Bit
Dim G_p As Bit, G_n As Bit
Dim B_p of As Bit, B_n of As Bit
Dim R_TEMP of As Byte
Dim G_temp of As Byte
Dim B_temp of As Byte
Dim Countryld of As Byte
the Declare Sub Rgb (ByVal Rr of As Byte, ByVal Gg of As Byte, ByVal Bb of As Byte, ByVal Tt of the of As Byte)
Sub Rgb(byval Rr As Byte, Byval Gg As Byte, Byval Bb As Byte, Byval Tt As Byte)
I = Tt * 1000
X = I / 255
If Rr <> R_temp Then
If Rr = 1 Then
R_p = 1
Else
R_n = 1
End If
End If
If Gg <> G_temp Then
If Gg = 1 Then
G_p = 1
Else
G_n = 1
End If
End If
If Bb <> B_temp Then
If Bb = 1 Then
B_p = 1
Else
B_n = 1
End If
End If
For Coun = 0 To 255
If R_p = 1 Then R =
Coun If R_n = 1 Then R = 255 -coun
If G_p = 1 Then G =
Coun If G_n = 1 Then G = 255 -coun
If B_p = 1 Then B = Coun
If B_n = 1 Then B = 255 -coun'Locate
1, 1: Lcd R; ";"; G; ";"; B; Spc(10)
Waitms X
Next