Skip to content

Commit 0b84930

Browse files
author
Make Magazin
authored
Add files via upload
0 parents  commit 0b84930

5 files changed

+298
-0
lines changed

Netzwerktester.jpg

4.09 MB
Loading

Netzwerktester_08M2_I2C.bas

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#picaxe 08m2
2+
3+
symbol I2C_ADDR_MCP23017 = 0x40 ; I2C-Adresse des MCP23017
4+
5+
; Registeradressen des MCP23017
6+
symbol REG_GPIOA = 0x12
7+
symbol REG_GPIOB = 0x13
8+
symbol REG_IODIRA = 0x00
9+
symbol REG_IODIRB = 0x01
10+
symbol REG_IOCON = 0x0A
11+
12+
symbol DELAYTIME = 500 ; Pausenzeit in ms nach jeder LED
13+
14+
symbol LED1 = bit0 ; an GPIOA0
15+
symbol LED2 = bit1 ; an GPIOA1
16+
symbol LED3 = bit2 ; an GPIOA2
17+
symbol LED4 = bit3 ; an GPIOA3
18+
symbol LED5 = bit4 ; an GPIOA4
19+
symbol LED6 = bit5 ; an GPIOA5
20+
symbol LED7 = bit6 ; an GPIOA6
21+
symbol LED8 = bit7 ; an GPIOA7
22+
symbol LED9 = bit15 ; an GPIOB7
23+
symbol LEDS_A = b0 ; GPIOA
24+
symbol LEDS_B = b1 ; GPIOB
25+
symbol counter = b2
26+
symbol ledNumber = b3
27+
28+
29+
gosub i2cInit
30+
gosub clearAllLeds
31+
main_loop:
32+
ledNumber = 0
33+
for counter = 1 to 9
34+
gosub clearLed ; aktuelle LED aus
35+
inc ledNumber ; LED-Nummer erhoehen
36+
gosub setLed ; aktuelle LED an
37+
pause DELAYTIME
38+
next counter
39+
40+
gosub clearLed ; aktuelle LED aus
41+
pause DELAYTIME ; 2 Takte lang alle LEDs aus
42+
pause DELAYTIME ; ~
43+
goto main_loop
44+
45+
46+
setLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) ein
47+
select case ledNumber
48+
case 1
49+
LED1 = 1
50+
case 2
51+
LED2 = 1
52+
case 3
53+
LED3 = 1
54+
case 4
55+
LED4 = 1
56+
case 5
57+
LED5 = 1
58+
case 6
59+
LED6 = 1
60+
case 7
61+
LED7 = 1
62+
case 8
63+
LED8 = 1
64+
case 9
65+
LED9 = 1
66+
endselect
67+
hi2cout (REG_GPIOA, LEDS_A, LEDS_B)
68+
return
69+
70+
71+
clearLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) aus
72+
select case ledNumber
73+
case 1
74+
LED1 = 0
75+
case 2
76+
LED2 = 0
77+
case 3
78+
LED3 = 0
79+
case 4
80+
LED4 = 0
81+
case 5
82+
LED5 = 0
83+
case 6
84+
LED6 = 0
85+
case 7
86+
LED7 = 0
87+
case 8
88+
LED8 = 0
89+
case 9
90+
LED9 = 0
91+
endselect
92+
hi2cout (REG_GPIOA, LEDS_A, LEDS_B)
93+
return
94+
95+
96+
clearAllLeds: ; schaltet alle LEDs 1-9 aus
97+
for ledNumber = 1 to 9
98+
gosub clearLed
99+
next ledNumber
100+
return
101+
102+
103+
i2cInit:
104+
hi2csetup i2cmaster,I2C_ADDR_MCP23017,i2cslow,i2cbyte
105+
hi2cout (REG_IOCON, 0x20) ; sequential opmode abschalten
106+
hi2cout (REG_IODIRA, 0x00, 0x7F) ; GPIOA0-7 und GPIOB7 als Ausgaenge schalten (0=Ausgang)
107+
return

Netzwerktester_14M2.bas

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#picaxe 14m2
2+
3+
symbol DELAYTIME = 500 ; Pausenzeit in ms nach jeder LED
4+
5+
symbol LED1 = C.0
6+
symbol LED2 = C.1
7+
symbol LED3 = C.2
8+
symbol LED4 = B.5
9+
symbol LED5 = B.4
10+
symbol LED6 = B.3
11+
symbol LED7 = B.2
12+
symbol LED8 = B.1
13+
symbol LED9 = C.4 ; Schirm
14+
15+
symbol counter = b2
16+
symbol ledNumber = b3
17+
18+
19+
gosub clearAllLeds
20+
main_loop:
21+
ledNumber = 0
22+
for counter = 1 to 9
23+
gosub clearLed ; aktuelle LED aus
24+
inc ledNumber ; LED-Nummer erhoehen
25+
gosub setLed ; aktuelle LED an
26+
pause DELAYTIME
27+
next counter
28+
29+
gosub clearLed ; aktuelle LED aus
30+
pause DELAYTIME ; 2 Takte lang alle LEDs aus
31+
pause DELAYTIME ; ~
32+
goto main_loop
33+
34+
35+
setLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) ein
36+
select case ledNumber
37+
case 1
38+
high LED1
39+
case 2
40+
high LED2
41+
case 3
42+
high LED3
43+
case 4
44+
high LED4
45+
case 5
46+
high LED5
47+
case 6
48+
high LED6
49+
case 7
50+
high LED7
51+
case 8
52+
high LED8
53+
case 9
54+
high LED9
55+
endselect
56+
return
57+
58+
59+
clearLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) aus
60+
select case ledNumber
61+
case 1
62+
low LED1
63+
case 2
64+
low LED2
65+
case 3
66+
low LED3
67+
case 4
68+
low LED4
69+
case 5
70+
low LED5
71+
case 6
72+
low LED6
73+
case 7
74+
low LED7
75+
case 8
76+
low LED8
77+
case 9
78+
low LED9
79+
endselect
80+
return
81+
82+
83+
clearAllLeds: ; schaltet alle LEDs 1-9 aus
84+
for ledNumber = 1 to 9
85+
gosub clearLed
86+
next ledNumber
87+
return

Netzwerktester_20M2.bas

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#picaxe 20m2
2+
3+
symbol DELAYTIME = 500 ; Pausenzeit in ms nach jeder LED
4+
5+
symbol LED1 = B.7
6+
symbol LED2 = B.6
7+
symbol LED3 = B.5
8+
symbol LED4 = B.4
9+
symbol LED5 = B.3
10+
symbol LED6 = B.2
11+
symbol LED7 = B.1
12+
symbol LED8 = B.0
13+
symbol LED9 = C.7 ; Schirm
14+
15+
symbol counter = b2
16+
symbol ledNumber = b3
17+
18+
19+
gosub clearAllLeds
20+
main_loop:
21+
ledNumber = 0
22+
for counter = 1 to 9
23+
gosub clearLed ; aktuelle LED aus
24+
inc ledNumber ; LED-Nummer erhoehen
25+
gosub setLed ; aktuelle LED an
26+
pause DELAYTIME
27+
next counter
28+
29+
gosub clearLed ; aktuelle LED aus
30+
pause DELAYTIME ; 2 Takte lang alle LEDs aus
31+
pause DELAYTIME ; ~
32+
goto main_loop
33+
34+
35+
setLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) ein
36+
select case ledNumber
37+
case 1
38+
high LED1
39+
case 2
40+
high LED2
41+
case 3
42+
high LED3
43+
case 4
44+
high LED4
45+
case 5
46+
high LED5
47+
case 6
48+
high LED6
49+
case 7
50+
high LED7
51+
case 8
52+
high LED8
53+
case 9
54+
high LED9
55+
endselect
56+
return
57+
58+
59+
clearLed: ; schaltet LED mit Nummer in Variable "ledNumber" (1-9) aus
60+
select case ledNumber
61+
case 1
62+
low LED1
63+
case 2
64+
low LED2
65+
case 3
66+
low LED3
67+
case 4
68+
low LED4
69+
case 5
70+
low LED5
71+
case 6
72+
low LED6
73+
case 7
74+
low LED7
75+
case 8
76+
low LED8
77+
case 9
78+
low LED9
79+
endselect
80+
return
81+
82+
83+
clearAllLeds: ; schaltet alle LEDs 1-9 aus
84+
for ledNumber = 1 to 9
85+
gosub clearLed
86+
next ledNumber
87+
return

readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
![GitHub Logo](http://www.heise.de/make/icons/make_logo.png)
2+
3+
Maker Media GmbH
4+
***
5+
6+
# Nano-Axe-Board als Netzwerktester
7+
Hilft bei Problemen mit selbst-gecrimpten Netzwerksteckern
8+
9+
### Netzwerktester mit PICAXE-Board
10+
11+
Sicher und unempfindlich gegen Störungen – der Internetzugang über RJ45-Kabel hat seine Vorzüge. Wer die Kabel ohne Stecker verlegt, kann sie passgenau und unauffällig einbauen. Kommt es doch zu Problemen, hilft unser Picaxe-Netzwerktester weiter.
12+
13+
![Picture](https://github.com/MakeMagazinDE/Netzwerktester/blob/main/Netzwerktester.jpg)
14+
15+
Den vollständigen Artikel mit der Bauanleitung gibt es in der [Make-Ausgabe 1/2022](https://www.heise.de/select/make/2022/1/seite-52) zu lesen.
16+
17+
Um den Picaxe-Einstieg bequemer zu machen, haben wir eine komplett neue Platine entworfen, die mit verschiedenen Picaxe-Chips kompatibel ist, unsere Nano-Axe-Platine. Zum Programmieren ist nur ein Mikro-USB-Kabel nötig. Mit der Nano-Axe-Platine können Sie den Picaxe-08M2 nutzen sowie die Chips 14M2, 20M2 und 20X2. Das Nano-Axe-Board ist [exklusiv im Heise Shop erhältlich](https://shop.heise.de/make-picaxe-special-2020/Print).

0 commit comments

Comments
 (0)