Bascom will nicht wie ich will

OP #1666627
Lesenswert?

Hallihallo,

ich habe mir heute mein Pollin Atmel Evaluationsboard zusammen gelötet.
Hab gleich mal was mit Bascom versucht:
1
$regfile = "m16def.dat"                                     ' specify the used micro
2
$crystal = 8000000                                          ' used crystal frequency
3

4
$hwstack = 32                                               ' default use 32 for the hardware stack
5
$swstack = 10                                               ' default use 10 for the SW stack
6
$framesize = 40                                             ' default use 40 for the frame space
7

8
Config Pind.5 = Output
9
Config Pind.6 = Output
10

11

12

13
 Do
14

15

16
     Pind.5 = 0
17
     Pind.6 = 1
18
     Wait 1
19
     Pind.6 = 0
20
     Pind.5 = 1
21
        Wait 1
22
  loop

Pind.5 & Pind.6 sind laut Doku die beiden LEDs. Diese müssten jetzt im 
sekunden Takt abwechselnd blinken, oder?
Das machen sie nämlich nicht :-(
Gast #1666655
Lesenswert?

Also das muß so aussehen:
1
regfile = "m16def.dat"                                     ' specify the used micro
2
$crystal = 8000000                                          ' used crystal frequency
3

4
$sim
5

6
$hwstack = 32                                               ' default use 32 for the hardware stack
7
$swstack = 10                                               ' default use 10 for the SW stack
8
$framesize = 40                                             ' default use 40 for the frame space
9

10
Config Portd.5 = Output
11
Config Portd.6 = Output
12

13

14

15
 Do
16

17

18
     Portd.5 = 0
19
     Portd.6 = 1
20
     Wait 1
21
     Portd.6 = 0
22
     Portd.5 = 1
23
        Wait 1
24
  loop

PIND definiert Eingänge, PORTD die Ausgänge!

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren