Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picsimlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
picsimlab
Commits
2430c7f9
Commit
2430c7f9
authored
Aug 15, 2020
by
lcgamboa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chg: LCD hd44780 input pin bug fixed !minor
parent
9be06f6e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
src/boards/board_ucsim.cc
src/boards/board_ucsim.cc
+4
-1
src/parts/part_LCD_hd44780.cc
src/parts/part_LCD_hd44780.cc
+6
-6
No files found.
src/boards/board_ucsim.cc
View file @
2430c7f9
...
...
@@ -290,9 +290,12 @@ board_ucsim::MStep(void)
if
(
*
pins
[
i
].
port
<
4
)
{
pins
[
i
].
value
=
(
p
[
*
pins
[
i
].
port
]
&
(
0x0001
<<
pins
[
i
].
pord
))
>
0
;
if
(
procid
!=
PID_C51
)
{
pins
[
i
].
dir
=
(
p
[
*
pins
[
i
].
port
]
&
(
0x0100
<<
pins
[
i
].
pord
))
>
0
;
}
}
}
}
...
...
src/parts/part_LCD_hd44780.cc
View file @
2430c7f9
...
...
@@ -408,11 +408,11 @@ cpart_LCD_hd44780::Process(void)
//lcd dipins[2].display code
if
((
input_pins
[
1
]
>
0
)
&&
(
!
ppins
[
input_pins
[
1
]
-
1
].
dir
)
&&
(
!
ppins
[
input_pins
[
1
]
-
1
].
value
))
if
((
input_pins
[
1
]
>
0
)
&&
(
!
ppins
[
input_pins
[
1
]
-
1
].
value
))
{
if
(
!
lcde
)
{
if
(
(
input_pins
[
10
]
>
0
)
&&
(
!
ppins
[
input_pins
[
10
]
-
1
].
dir
)
)
if
(
input_pins
[
10
]
>
0
)
{
if
(
!
ppins
[
input_pins
[
10
]
-
1
].
value
)
{
...
...
@@ -427,11 +427,11 @@ cpart_LCD_hd44780::Process(void)
if
((
input_pins
[
3
]
>
0
)
&&
(
ppins
[
input_pins
[
3
]
-
1
].
value
))
d
|=
0x02
;
if
((
input_pins
[
2
]
>
0
)
&&
(
ppins
[
input_pins
[
2
]
-
1
].
value
))
d
|=
0x01
;
if
(
(
!
ppins
[
input_pins
[
0
]
-
1
].
dir
)
&&
(
!
ppins
[
input_pins
[
0
]
-
1
].
value
)
)
if
(
!
ppins
[
input_pins
[
0
]
-
1
].
value
)
{
lcd_cmd
(
&
lcd
,
d
);
}
else
if
((
!
ppins
[
input_pins
[
0
]
-
1
].
dir
)
&&
(
ppins
[
input_pins
[
0
]
-
1
].
value
))
else
{
lcd_data
(
&
lcd
,
d
);
}
...
...
@@ -439,11 +439,11 @@ cpart_LCD_hd44780::Process(void)
else
//Read
{
unsigned
char
val
=
0
;
if
(
(
!
ppins
[
input_pins
[
0
]
-
1
].
dir
)
&&
(
!
ppins
[
input_pins
[
0
]
-
1
].
value
)
)
if
(
!
ppins
[
input_pins
[
0
]
-
1
].
value
)
{
val
=
lcd_read_busyf_acounter
(
&
lcd
);
}
else
if
((
!
ppins
[
input_pins
[
0
]
-
1
].
dir
)
&&
(
ppins
[
input_pins
[
0
]
-
1
].
value
))
else
{
val
=
lcd_read_data
(
&
lcd
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment