Home » Archimedes archive » Acorn User » AU 1998-04 A.adf » Regulars » RTR/IICtst
RTR/IICtst
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1998-04 A.adf » Regulars |
Filename: | RTR/IICtst |
Read OK: | ✔ |
File size: | 0153 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM> IIC test 20PRINT "Read the temprature sensor" 30PRINT "By Mike Cook" 40DIM PBK% 5 50SensNo%=3 60Add%= &91 OR (SensNo%<<1) 70REPEAT 80PRINT TAB(0,3) 90SYS "IIC_Control",Add%,PBK%,2 100D=FNtread(PBK%?0,PBK%?1) 110PRINT D;"�C" 120T%=TIME+10 130REPEAT UNTIL TIME>T% 140UNTIL FALSE 150 160DEF FNtread(A%,B%) 170LOCAL D% 180D%=((A%<<1) + (B%>>7)) 190IF D%>&FF THEN D%=D% OR &FFFFFF00 200=D%/2
�> IIC test "� "Read the temprature sensor" � "By Mike Cook" (� PBK% 5 2 SensNo%=3 <Add%= &91 � (SensNo%<<1) F� P� �0,3) Z ș "IIC_Control",Add%,PBK%,2 dD=�tread(PBK%?0,PBK%?1) n� D;"�C" xT%=�+10 �� � �>T% �� � � �� �tread(A%,B%) �� D% �D%=((A%<<1) + (B%>>7)) � � D%>&FF � D%=D% � &FFFFFF00 � =D%/2 �
00000000 0d 00 0a 0f f4 3e 20 49 49 43 20 74 65 73 74 0d |.....> IIC test.| 00000010 00 14 22 f1 20 22 52 65 61 64 20 74 68 65 20 74 |..". "Read the t| 00000020 65 6d 70 72 61 74 75 72 65 20 73 65 6e 73 6f 72 |emprature sensor| 00000030 22 0d 00 1e 14 f1 20 22 42 79 20 4d 69 6b 65 20 |"..... "By Mike | 00000040 43 6f 6f 6b 22 0d 00 28 0c de 20 50 42 4b 25 20 |Cook"..(.. PBK% | 00000050 35 0d 00 32 0d 53 65 6e 73 4e 6f 25 3d 33 0d 00 |5..2.SensNo%=3..| 00000060 3c 1c 41 64 64 25 3d 20 26 39 31 20 84 20 28 53 |<.Add%= &91 . (S| 00000070 65 6e 73 4e 6f 25 3c 3c 31 29 0d 00 46 05 f5 0d |ensNo%<<1)..F...| 00000080 00 50 0b f1 20 8a 30 2c 33 29 0d 00 5a 20 c8 99 |.P.. .0,3)..Z ..| 00000090 20 22 49 49 43 5f 43 6f 6e 74 72 6f 6c 22 2c 41 | "IIC_Control",A| 000000a0 64 64 25 2c 50 42 4b 25 2c 32 0d 00 64 1b 44 3d |dd%,PBK%,2..d.D=| 000000b0 a4 74 72 65 61 64 28 50 42 4b 25 3f 30 2c 50 42 |.tread(PBK%?0,PB| 000000c0 4b 25 3f 31 29 0d 00 6e 0c f1 20 44 3b 22 b0 43 |K%?1)..n.. D;".C| 000000d0 22 0d 00 78 0b 54 25 3d 91 2b 31 30 0d 00 82 0c |"..x.T%=.+10....| 000000e0 f5 20 fd 20 91 3e 54 25 0d 00 8c 07 fd 20 a3 0d |. . .>T%..... ..| 000000f0 00 96 04 0d 00 a0 13 dd 20 a4 74 72 65 61 64 28 |........ .tread(| 00000100 41 25 2c 42 25 29 0d 00 aa 08 ea 20 44 25 0d 00 |A%,B%)..... D%..| 00000110 b4 1a 44 25 3d 28 28 41 25 3c 3c 31 29 20 2b 20 |..D%=((A%<<1) + | 00000120 28 42 25 3e 3e 37 29 29 0d 00 be 20 e7 20 44 25 |(B%>>7))... . D%| 00000130 3e 26 46 46 20 8c 20 44 25 3d 44 25 20 84 20 26 |>&FF . D%=D% . &| 00000140 46 46 46 46 46 46 30 30 0d 00 c8 09 3d 44 25 2f |FFFFFF00....=D%/| 00000150 32 0d ff |2..| 00000153