|
3.2768 MHz
2400 4800 9600 14400 19200 28800 38400 57600 76800 115200 |
MHz
UBRR= 84 UBRR= 42 UBRR= 20 UBRR= 13 UBRR= 10 UBRR= 6 UBRR= 4 UBRR= 3 UBRR= 2 UBRR= 1 |
%Error
0.4 0.8 1.6 1.6 3.1 1.6 6.3 12.5 12.5 12.5 |
3.6864 MHz
UBRR= 95 UBRR= 47 UBRR= 23 UBRR= 15 UBRR= 11 UBRR= 7 UBRR= 5 UBRR= 3 UBRR= 2 UBRR= 1 |
%Error
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 |
4 MHz
UBRR= 103 UBRR= 51 UBRR= 25 UBRR= 16 UBRR= 12 UBRR= 8 UBRR= 6 UBRR= 3 UBRR= 2 UBRR= 1 |
%Error
0.2 0.2 0.2 2.1 0.2 3.7 7.5 7.8 7.8 7.8 |
4.608 MHz
UBRR= 119 UBRR= 59 UBRR= 29 UBRR= 19 UBRR= 14 UBRR= 9 UBRR= 7 UBRR= 4 UBRR= 3 UBRR= 2 |
%Error
0.2 0.0 0.0 0.0 0.0 0.0 6.7 0.0 6.7 20.0 |
| PIN No | Symbol | Level | Pin description | Functions |
|---|---|---|---|---|
| 1 | Vss | - | Ground | 0V |
| 2 | Vdd | - | Supply volltage for logic | 5V± 5% |
| 3 | Vo | Contrast adjustment | Decision by user system | |
| 4 | RS | H/L | Register selection | H:Data input L: Instruction code input |
| 5 | R/!W | H/L | Read/Write | H:Read L:Write |
| 6 | E | H,H->L | Enable signal | - |
| 7 | DB0 | H/L | Data bit 0 | |
| 8 | DB1 | H/L | Data bit 1 | |
| 9 | DB2 | H/L | Data bit 2 | |
| 10 | DB3 | H/L | Data bit 3 | |
| 11 | DB4 | H/L | Data bit 4 | |
| 12 | DB5 | H/L | Data bit 5 | |
| 13 | DB6 | H/L | Data bit 6 | |
| 14 | DB7 | H/L | Data bit 7 |
Code:
Dim BusCOMServer As New TBusServer
Dim a As Integer
Private Sub CommandButton1_Click()
Dim S As String * 40
Dim x As Long
'Get inputs
Range("c4").Value = BusCOMServer.InputGet(Range("a4").Value)
Range("c10").Value = BusCOMServer.InputGet(Range("a10").Value)
'set outputs
BusCOMServer.OutputSet Range("a4").Value, Range("c6").Value
BusCOMServer.OutputSet Range("a10").Value, Range("c12").Value
' set lcd text
S = Range("c8").Text
BusCOMServer.LCDTxt Range("a4").Value, S
S = Range("c14").Text
BusCOMServer.LCDTxt Range("a10").Value, S
End Sub
Private Sub CommandButton2_Click()
Dim S As String
S = BusCOMServer.About()
Response = MsgBox(S)
End Sub