chiark
/
gitweb
/
~ijackson
/
trains.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcd4475
)
bugfixes
author
ian
<ian>
Mon, 21 Nov 2005 00:51:49 +0000
(
00:51
+0000)
committer
ian
<ian>
Mon, 21 Nov 2005 00:51:49 +0000
(
00:51
+0000)
detpic/i2clib.asm
patch
|
blob
|
history
detpic/test-sofar.asm
patch
|
blob
|
history
diff --git
a/detpic/i2clib.asm
b/detpic/i2clib.asm
index f0a25658ca24a506669510bd534744412135f066..0c3e80ff85e9222a8c52b33d7ca8d7d424cec405 100644
(file)
--- a/
detpic/i2clib.asm
+++ b/
detpic/i2clib.asm
@@
-91,6
+91,7
@@
slave2addr
i2cm_init
mov_lw 100-1 ; baud rate = Fosc/(4*(SSPADD+1))
mov_wf SSPADD ; Fosc=20MHz, so SSPADD==99 means 50kbit/s
+ clr_f st
mov_lw 0x08 ; !SSPEN, Master mode
mov_wf SSPCON1
clr_f SSPCON2 ; nothing going
@@
-155,7
+156,8
@@
m_start
; slave any slave_number
; expects to return directly to main program (caller)
mov_wf slave
- and_lw 31
+ bra_z m_improper_slave
+ and_lw ~31
bra_nz m_improper_slave
bs_f st, st_starting
bs_f SSPCON2, SEN
diff --git
a/detpic/test-sofar.asm
b/detpic/test-sofar.asm
index b63dd7f92212ba1b48b4d3621b125d228e296e6d..10515fff1fe52e8a5ca8c7abc5e05fbbe2247eae 100644
(file)
--- a/
detpic/test-sofar.asm
+++ b/
detpic/test-sofar.asm
@@
-126,8
+126,9
@@
master
call i2cm_init
call led_green
+ mov_lfsr 0x0200, 1
rcall m_buffer_reset
- set_f INDF
0
+ set_f INDF
1
mov_lw '|'
rcall serial_write_char
@@
-177,7
+178,6
@@
serialu_read_char
m_ch_notdigit
mov_lfsr 0x0200, 0
- mov_lfsr 0x0200, 1
mov_wf FSR0H ; prevent crashes due to wrapping
return