View previous topic :: View next topic |
Author |
Message |
Ran
Joined: 01 Dec 2004 Posts: 4
|
Posted: Wed Dec 01, 2004 9:41 am Post subject: I cannot program |
|
|
Hello,
I bought Bascom lately, and..
I have problems with my STK200 Programmer.
Everytime I try to program, the code don't seems to work.
As I remember when programming with my friends programmer,
each time a program was loaded, at the end, the 8 led's did light up.
But with my programmer the 8 led's do not light up at the end of
programming, so I think something is wrong but I cannot find exactly
what.
Can somebody help me?
Thanks,
Ran |
|
Back to top |
|
|
Ran
Joined: 01 Dec 2004 Posts: 4
|
Posted: Wed Dec 01, 2004 9:53 am Post subject: I cannot progam bis |
|
|
I am using DC 12Volts, jp1 open, jp2 closed. |
|
Back to top |
|
|
naicheben
Joined: 18 Nov 2004 Posts: 47 Location: Leck
|
Posted: Wed Dec 01, 2004 1:44 pm Post subject: |
|
|
I have the same settings, but 9V.
If you start programming and you don't get any errors, then it might be your code thats wrong. Try to post it. Tell us, witch device you are using. |
|
Back to top |
|
|
Ran
Joined: 01 Dec 2004 Posts: 4
|
Posted: Wed Dec 01, 2004 2:21 pm Post subject: |
|
|
I am using the "8515"
Well here is the program:
'8515in
Dim Adr As Byte , F As Byte , W As Byte , X As Byte
Dim Y As Byte , I As Word
Dim A As Byte , B As Byte , C As Byte , D As Byte
Dim G As Byte
$crystal = 7372800
'inputs=0 outputs=1
Ddra = &B10111101
Ddrb = &B11111111
Ddrc = &B11111011
Ddrd = &B11111011
Open "COMA.0:9600,8,N,1,INVERTED" For Output As #3
' Var op nul zetten
Print #3 , "OK1";
C = 0
D = 0
G = 0
Gosub Schrijf
A = 0
B = 0
C = 0
Lees:
Print #3 , "1";
'lees in A en B
I = 0
Reset Portc.6
Set Portc.6
Set Portc.3
Shiftin Pinc.2 , Portc.4 , I , 0 , 16
Reset Portc.3
B = High(i)
A = Low(i)
Print #3 , B
Goto Lees
Schrijf:
'schrijf C, D en G
Shiftout Portc.5 , Portc.0 , G , 0
Shiftout Portc.5 , Portc.0 , D , 0
Shiftout Portc.5 , Portc.0 , C , 0
Sound Portc.1 , 1 , 1
Return
It simply ouputs with PRINT, but even the Print "OK1"
cannot be found.
Bigger programs from the past who are working fine on my
friends programmer don't work with mine.
Greetings,
Ran |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Dec 01, 2004 5:48 pm Post subject: |
|
|
Start with a simple program first :
$crystal=4000000
config portb=output
do
toggle portb
waitms 1000
loop
Then compile, program and check.
The jumpers of portb must be inserted. Things to try :
-did you select stk200 programmer?
-do the leds light up while programming
-did you not select 'reverse byte' in Compiler Output ? this option should NOT be checked.
-is external osciallator selected?
-is the thip 90s8515 or mega8515 _________________ Mark |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Wed Dec 01, 2004 7:29 pm Post subject: |
|
|
hi
did you declare a printer ?
did you put the 8515 in the digital 40 ports ?
JP
last did you open the power supply ?
bon courage _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
Ran
Joined: 01 Dec 2004 Posts: 4
|
Posted: Fri Dec 03, 2004 9:09 am Post subject: |
|
|
Yes it works !
In Compiler Output I unchecked 'Swap words' and now everything
works fine.
Thank You guys
Thanks and Greetings,
Ran |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|