Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

getting back to STK 300 and bascom
Goto page 1, 2  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
carlcharpentier

Bascom Member



Joined: 14 Jan 2015
Posts: 7

PostPosted: Wed Jan 28, 2015 9:53 pm    Post subject: getting back to STK 300 and bascom Reply with quote

Hello all
i've done some work for my job on STK300 back in the days (about 10 years ago)
I was using a serial programmer, and a USB/RS232 converter... it wasn't very fast, but it worked well

So now what ? i bought a kit that came with a USB ISB programmer from kanda
I am so very confused with that, i've read several pages on the help file, installed AVR Studio 4, and AVRISP-U

that AVRISP-U seems to see the M128, but that's as far as i went today... after what, 6 hours ?
tried uploading an old binary code i made, and its not working.

I would have prefered buying programmers straight from MC selec, but on the website it said they were out of stock for the next 2 years...

What would be my best option ?
is the basic USB programmer kit from Kanda usable with Bascom, or must i buy another programmer and wait for a week or more ?

My only guess is to buy a serial programmer, and use an old USB/RS232 device+driver, and do it the old way, but USB sounds so much better !

Thanks to whoever can helps, i'll surely tryout anything i can in the meantime and try to make something work, can't wait to do actual programming
Carl

(BASCOM-AVR version : 2.0.7.8 )
Back to top
View user's profile
Plons

Bascom Member



Joined: 24 May 2005
Posts: 434
Location: Hilversum - The Netherlands

netherlands.gif
PostPosted: Wed Jan 28, 2015 10:15 pm    Post subject: Reply with quote

From China you can have a USBASP for a few euro's: http://www.banggood.com/buy/Usbasp.html
Works perfectly with BascomAVR, and pretty fast compared with what you have.

Like Ben use to say: have fun !

Nard

_________________
Bascom AVR ver 2.0.8.1
ProtectedParallelPortProgrammingDongle: http://www.aplomb.nl/TechStuff/PPPD/PPPD%20English.html
Dragon-lair: http://www.aplomb.nl/TechStuff/Dragon/Dragon.html
"leef met vlag en wimpel, maar hou het simpel"
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4975
Location: Holland

blank.gif
PostPosted: Wed Jan 28, 2015 10:16 pm    Post subject: Reply with quote

you need to use the kanda programmer with the kanda software. bascom does support stk200/stk300 but no other kanda programmers.
when you have an LPT your old stk200 lpt dongle will work too. but of course, an usb programmer is way better.

_________________
Mark
Back to top
View user's profile Visit poster's website
carlcharpentier

Bascom Member



Joined: 14 Jan 2015
Posts: 7

PostPosted: Wed Jan 28, 2015 10:57 pm    Post subject: Reply with quote

Ok thank you very much
so i'll order a few of the programmers suggested, not sure how long it is gonna take to get to my place in Montréal / Canada

in the meantime, if i could still program and start my job, i would appreciate.
So i can make a program in Bascom, compile it, and in the Kanda application (AVRISP-U), i load the .hex file into the flash memory, and send it to the stk300 ?

So far, doesn't work. I setup the AVRISP-U with the M128 chip... i'm really beginning, and i'm clueless...

if someone knows a good place to start Learning that, beside the STK300 pdf that looks very outdated... i'll gladly read it
Carl
Back to top
View user's profile
carlcharpentier

Bascom Member



Joined: 14 Jan 2015
Posts: 7

PostPosted: Wed Jan 28, 2015 11:37 pm    Post subject: Reply with quote

15 to 20 days for delivery, urgh

i also have a big JTAGice with a usb wire that came in a stk300 kit, not sure if that can be used as a programmer, and if so, if it could help me program something and get things moving a little

peace,
Carl
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4975
Location: Holland

blank.gif
PostPosted: Wed Jan 28, 2015 11:42 pm    Post subject: Reply with quote

yes the kanda soft should be able to load the hex file into the m128.
just make sure the int/ext clock jumper is set properly. And that power supply is right. (you can have 3v3 and 5v). Otherwise contact kanda.

the jtagice is this from atmel? an orange box? that should work. first get it going with avr studio. and then read the libusb topic in bascom help and install libusb. after that select programmer in bascom and it should work.

_________________
Mark
Back to top
View user's profile Visit poster's website
carlcharpentier

Bascom Member



Joined: 14 Jan 2015
Posts: 7

PostPosted: Thu Jan 29, 2015 10:44 pm    Post subject: Reply with quote

Mark, world,
Find attached the JTAGice i'm talking about
its very anonym, no model or anything

it came with that kit : http://microcontrollershop.com/product_info.php?products_id=2224&osCsid=oqm0rrhgqqp6781d9qrj6rf9m5
not sure if you can have additionnal information about it...
i have installed libUSB as explained in bascom help, and all... not much success
just trying out stuff, hoping for some improvement, i set-up the jtag in bascom with what follows :

Programmer : JTAG MKII
Clock : 1000000
Timeout USB : 100
AVRISP protocol : checked
USB : checked

can't communicate with the device, chip ID ffff and all
can't set it up in AVR studio 4, i could do absolutely nothing in that software, i must be stupid of something

The thing is : i read a lot more littérature from Kanda for the STK300, and got some sample code and all..
I took a .hex file sample that should blink LEDs on board, and uploaded it with the AVRISP-U soft from Kanda, and still nothing
i can read the M128 flash memory and compare it with the .hex file, and it 100% the same.
i tried about 10 .hex file, only 2 worked, one that you can push buttons and trigger leds, so i know the code goes in the chip, and the switchs/leds works

i'll have fun trying to communicate with a GPS if i can't even flash a led

oh and i wrote to Kanda about that, and they told me i should be able to take a .hex sample and upload it without any setting changes, and it should work like a charm, but its not
tried it on a second STK300 board, and changed the M128 for a spare one i had, with static gloves, and same results. anyways, when i verify the flash memory, its all good, so i guess the chip is working.


PS i will not ask questions every day, once i can communicate with my STK300/M128 i'll be on my way and happy
cheers
Carl
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4975
Location: Holland

blank.gif
PostPosted: Thu Jan 29, 2015 10:55 pm    Post subject: Reply with quote

carl

that seems more like a normal mkII programmer, but a clone. your best option is to first connect it with avr studio. select avr isp mkII programmer, not jtag!

then for the chip : the m128 is an old one and has a nasty fuse bit which is set by default : the M103 compatibility fuse.
so in order to use a new m128 you need to use the m128103 dat file !
of you want to use m128def.dat, you need to turn off the M103 fuse first.

bascom can only control usb programmers once they work correct with the original software.

_________________
Mark
Back to top
View user's profile Visit poster's website
olhexy

Bascom Member



Joined: 03 Apr 2011
Posts: 169
Location: Tilburg, Netherlands

netherlands.gif
PostPosted: Fri Jan 30, 2015 12:19 am    Post subject: Re: getting back to STK 300 and bascom Reply with quote

carlcharpentier wrote:
Hello all
i've done some work for my job on STK300 back in the days (about 10 years ago)
I was using a serial programmer, and a USB/RS232 converter... it wasn't very fast, but it worked well

So now what ? i bought a kit that came with a USB ISB programmer from kanda
I am so very confused with that, i've read several pages on the help file, installed AVR Studio 4, and AVRISP-U

that AVRISP-U seems to see the M128, but that's as far as i went today... after what, 6 hours ?
tried uploading an old binary code i made, and its not working.

I would have prefered buying programmers straight from MC selec, but on the website it said they were out of stock for the next 2 years...

What would be my best option ?
is the basic USB programmer kit from Kanda usable with Bascom, or must i buy another programmer and wait for a week or more ?

My only guess is to buy a serial programmer, and use an old USB/RS232 device+driver, and do it the old way, but USB sounds so much better !

Thanks to whoever can helps, i'll surely tryout anything i can in the meantime and try to make something work, can't wait to do actual programming
Carl

(BASCOM-AVR version : 2.0.7.8 )

I am using the Kanda AVRISP-U (that small black one with 2 green LEDs) all the time. I had it with the STK200 that Kanda sells today. It also works om my original first STK200.
Software is still maintaned. My version is 2.4.1.12.

You say that it seems to recognise the m128. That suggest the hardware connection works.
I can confirm that just opening AVRISP-U when it is connected to my STK200 immediately reports the found AVR type, you do not first have to ask for that in the AVRISP-U menu.
If that is correct then you should also be able to read the AVR m128 flash with AVRISP-U:
Device/Read/Flash.

You do not need to have AVRstudio or libusb installed (that IS required for Atmel MKii).

To load yourfile.hex from into AVRISP-U do this:
Run AVR-ISP
Select: File/Load/Flash...
Manoevre to your directory with yourfile.hex
That's it! (the hex file should now be visable)
Back to top
View user's profile
carlcharpentier

Bascom Member



Joined: 14 Jan 2015
Posts: 7

PostPosted: Fri Jan 30, 2015 1:08 am    Post subject: Reply with quote

it works !
not entirely, but with the $regfile = "m103def.dat", i can now compile a small routine, upload the .hex file with AVRISP-U, and run it
like, i can flash LEDs and get switches

so i think its all gonna get going pretty fast
next will be the 16x2 LCD display
next will be a 2.1" tft screen
next will be a neat 2 meg external memory that can be seen as a usb key by any computer
then the GPS, the big part of my project

i'm so very excited thanks for your support and patience

its not super efficient to switch programs on every test, but my cheap ISP are ordered and will eventually get to me, should be faster then

joy ! i feel 10 years younger
Carl
Back to top
View user's profile
carlcharpentier

Bascom Member



Joined: 14 Jan 2015
Posts: 7

PostPosted: Tue Mar 03, 2015 2:35 pm    Post subject: Reply with quote

Quick question :
just got the USB-ASP from http://www.banggood.com/USBISP-USBASP-Downloader-Programmer-Download-Cable-For-ATMEL-AVR-p-931670.html , a month later

i selected USBASP as bascom COMPILER... tried auto speed... tried a few random speed, slower and slower
even at 8K.
It doesn't recognize the STK300, chip id 0000

i don't see much options there... should i install some kind of driver ?

in the meantime, i'll use the kanda cable with the kinda app

Regards,
Carl
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 4975
Location: Holland

blank.gif
PostPosted: Tue Mar 03, 2015 2:41 pm    Post subject: Reply with quote

it is not compatible with USB-ASP.
And there is no protocol available so you need to use their third party software.

_________________
Mark
Back to top
View user's profile Visit poster's website
carlcharpentier

Bascom Member



Joined: 14 Jan 2015
Posts: 7

PostPosted: Tue Mar 03, 2015 2:45 pm    Post subject: Reply with quote

Argh
According to Plons (second answer at the top of this topic), it was supposed to work
been waiting for a month to get those Evil or Very Mad

well... third party it is.

if you have a link with a USBisp cable i can buy somewhere to program a stk300 straight from bascom, i'll buy

Carl
Back to top
View user's profile
Plons

Bascom Member



Joined: 24 May 2005
Posts: 434
Location: Hilversum - The Netherlands

netherlands.gif
PostPosted: Wed Mar 04, 2015 5:05 pm    Post subject: Reply with quote

No need to give me an evil face Laughing

The STK200 and the STK300 require a signal to switch the ISP-pins from the I/O-header to the ISP-programmingport. An analog multiplexer is used for that purpose. The control-signal can be found on the STK's ISP connector pin3.

Check your usermanual page 23 and 24

The parallel port programmer as supplied with the STK controls pin3.
Standard ISP-programmers don't.

The fix is simple: connect pin3 to pin5 of the STK300 ISP-connector. Can be done at the bottomside of the STK300 PCB.

The /Reset-signal from the programmer now controls the analog multiplexer on the STK as well.

Have fun !

_________________
Bascom AVR ver 2.0.8.1
ProtectedParallelPortProgrammingDongle: http://www.aplomb.nl/TechStuff/PPPD/PPPD%20English.html
Dragon-lair: http://www.aplomb.nl/TechStuff/Dragon/Dragon.html
"leef met vlag en wimpel, maar hou het simpel"
Back to top
View user's profile
Plons

Bascom Member



Joined: 24 May 2005
Posts: 434
Location: Hilversum - The Netherlands

netherlands.gif
PostPosted: Wed Mar 04, 2015 5:06 pm    Post subject: Reply with quote

I also have a link for the schematic of the STK300:

http://www.rlocman.ru/i/Image/2010/03/12/STK300_Sch.png

_________________
Bascom AVR ver 2.0.8.1
ProtectedParallelPortProgrammingDongle: http://www.aplomb.nl/TechStuff/PPPD/PPPD%20English.html
Dragon-lair: http://www.aplomb.nl/TechStuff/Dragon/Dragon.html
"leef met vlag en wimpel, maar hou het simpel"
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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