FreeExpression icon indicating copy to clipboard operation
FreeExpression copied to clipboard

ISP Programming?

Open jordam opened this issue 9 years ago • 48 comments

Existing documentation shows flashing the firmware through the jtag interface, this is a more complex to reach then the ISP interface. Could one flash the firmware via the isp interface?

jordam avatar Aug 06 '15 11:08 jordam

Yes, the ISP header is the default method, exposed via the connector on the front of the machine. It is documented somewhere :) On my website I believe

this article discusses both methods

http://www.thetazzbot.com/2015/02/16/connecting-the-avr-dragon-to-the-craft-cutter/

thetazzbot avatar Aug 06 '15 19:08 thetazzbot

I suppose it does. The 'Next, the hard way' part made the think that the hard way was needed to flash the fimware.

Thanks!

jordam avatar Aug 06 '15 19:08 jordam

I just wanted to say thanks for making this software.

I was able to get it up and running over the course of a work night with 0 amtel experience. Seriously a breeze considering its reprogramming embedded controllers.

A key layout picture would be nice, but I was able to figure out load, unload, and pressure so far, and those are the basics.

jordam avatar Aug 14 '15 11:08 jordam

hello again, good to see your back, but my isp programmer does not like this, it will just restart the machine and avrdude error out. Any ideas what could be wrong?

TrendMend avatar Apr 04 '19 16:04 TrendMend

I'm not familiar with avr dude, but my steps for the Atmel studio are:

Configure the Tool Connect Read device I'd Go to memories, program device

On Thu, Apr 4, 2019, 11:21 AM TrendMend [email protected] wrote:

hello again, good to see your back, but my isp programmer does not like this, it will just restart the machine and avrdude error out. Any ideas what could be wrong?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thetazzbot/FreeExpression/issues/4#issuecomment-479966933, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJN6Jy26LoFDJKRZ0IPWKKCBBoQsng7ks5vdiaHgaJpZM4FmwR2 .

thetazzbot avatar Apr 04 '19 18:04 thetazzbot

Thanks, what programmer do you use? (if it;s not the one you used in your blog, of course)

TrendMend avatar Apr 05 '19 21:04 TrendMend

I'm using an AVR Dragon, in ISP mode, but any ISP programmer will suffice

On Fri, Apr 5, 2019 at 4:16 PM TrendMend [email protected] wrote:

Thanks, what programmer do you use?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thetazzbot/FreeExpression/issues/4#issuecomment-480424687, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJN6PlVyw9Ves9v_GKUQMnAF-acQytgks5vd70kgaJpZM4FmwR2 .

thetazzbot avatar Apr 06 '19 15:04 thetazzbot

Thanks, I have a cheapy pocket avr programmer by sparkfun, because I only needed it for my 3d printer lol. I will definitively check out some better ones on digikey though. it is pretty hard getting this stuff in Canada with how few retailers we have.

TrendMend avatar Apr 06 '19 16:04 TrendMend

That cheapo should work fine.

Did you try it with Atmel studio?

On Sat, Apr 6, 2019, 11:27 AM TrendMend [email protected] wrote:

Thanks, I have a cheapy pocket avr programmer by sparkfun, because I only needed it for my 3d printer lol. I will definitively check out some better ones on digikey though. it is pretty hard getting this stuff in Canada with how few retailers we have.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thetazzbot/FreeExpression/issues/4#issuecomment-480517397, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJN6FyK4Y0u5c9sfYxkuQByuYAD3j8jks5veMrhgaJpZM4FmwR2 .

thetazzbot avatar Apr 06 '19 18:04 thetazzbot

Just wanted to say, I was going through this same issue, but it is because the pinout of the usbtiny isp doesnt match the cricut. I used some jumpers to connect it per the diagram at your blog and it appears to have solved my avrdude issues.

KoiosLabs avatar May 19 '19 18:05 KoiosLabs

Hold on, What!? Okay could you please send me a link to the diagram? I have a usbtiny isp sparkfun clone but it didn't work when I did it the freeexpression way.

On Sun, May 19, 2019 at 12:16 PM Justin Hunt [email protected] wrote:

Just wanted to say, I was going through this same issue, but it is because the pinout of the usbtiny isp doesnt match the cricut. I used some jumpers to connect it per the diagram at your blog and it appears to have solved my avrdude issues.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thetazzbot/FreeExpression/issues/4?email_source=notifications&email_token=AFSAGDTDHZVVUJZ3JPEBZCLPWGKPTA5CNFSM4BM3AR3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVXHSTA#issuecomment-493779276, or mute the thread https://github.com/notifications/unsubscribe-auth/AFSAGDRE43KKNGTLZZA4QKTPWGKPTANCNFSM4BM3AR3A .

-- -Rulon Rock

Fx: (403) 252-8010 Em: [email protected]

TrendMend avatar May 19 '19 18:05 TrendMend

Sorry @KoiosLabs , I just gave up on this because of not being able to program it, could you please provide me the steps you did to reprogram it? I actually needed this cricut this week but since I couldn't make it cut custom without reprogramming (which avrdude gave an error on) I just used an exacto and a day of work haha.

TrendMend avatar May 19 '19 18:05 TrendMend

I'll post up a photo of the wiring once I validate it works... it seemed to flash ok, but I'm not 100% sure what I'm expecting now that the machine is on, I just see pressure:3, on the screen.

KoiosLabs avatar May 19 '19 18:05 KoiosLabs

ah, gotcha. Thanks, also I didn't remember freecut having pressure but I guess I was wrong haha

Edit: Yep I was wrong

Dials

Dial Speed: Also adjusts the cutting speed and is used to read the cutting speed after power up. Only the mid range of the speed choices can be selected, use the +/keys to get all the way to the end.

Dial Pressure: Also adjusts the cutting pressure and is used to read the initial pressure on power-up. Only the mid range of the pressure choices can be selected, use the +/keys for the full range.

Dial Size: Not used. The machine can cut up to 80"x12"wide.

TrendMend avatar May 19 '19 18:05 TrendMend

Using this image,

image

and this pinout of the usbtiny isp header: image

I cobbled together some jumper wires to make the pins lineup properly: IMG_20190519_142942 IMG_20190519_143007 IMG_20190519_143021 IMG_20190519_143033 IMG_20190519_143050

Apologies for the lousy photos, I didn't take the whole cricut apart because I'm lazy, so the space was quite limited.

If anything is unclear let me know and I can help you through it. Does seem to work through inkscape, but I need to get one of the cutting mats for it before I can 100% prove its cutting properly.

KoiosLabs avatar May 19 '19 18:05 KoiosLabs

Awesome thanks for that! one question though, what application did you use to program it?

TrendMend avatar May 19 '19 18:05 TrendMend

Hey! you got the same programmer as me haha!

TrendMend avatar May 19 '19 18:05 TrendMend

I just used avrdude from the command line, but you can follow the tutorials online to set that up in atmel studio if you want, it runs the same thing at the end of the day. Basically compiled the firmware, got the hex from debug/bin then ran something like: d:\avrdude\avrdude -c usbtiny -p m1281 -v -v -v -U flash:w:freeexpression.hex:i

then d:\avrdude\avrdude -c usbtiny -p m1281 -v -v -v -U eeprom:w:freeexpression.eep

Not sure you need the second one but why not.

I also did a dump of the oem firmware/eeprom before by doing: d:\avrdude\avrdude -c usbtiny -p m1281 -v -v -v -U flash:r:test.hex:i and d:\avrdude\avrdude -c usbtiny -p m1281 -v -v -v -U eeprom:r:eeprom.hex:i

No idea if that would let me reprogram back to stock, but I figured it was worth a try if i needed to.

KoiosLabs avatar May 19 '19 18:05 KoiosLabs

Thanks so much! I tried a few ways before giving up, like command line atmel studio and even the arduino ide (with the hex). I will definitely try this out right now!

TrendMend avatar May 19 '19 18:05 TrendMend

hey @KoiosLabs I keep getting a "initialization failed, rc=-1" error, how did you power your mcu? just through the avr pocket programmer or something else?

TrendMend avatar May 19 '19 19:05 TrendMend

Plugin the cricut and power it on, then set the usbtiny to no power.

KoiosLabs avatar May 19 '19 19:05 KoiosLabs

gotcha, thanks I will try that.

TrendMend avatar May 19 '19 19:05 TrendMend

Yes! it is working!! okay now I need to compile the hex file, I had atmel studio on my laptop, but I recently switched to ubuntu so I just gotta keep installing it on my desktop

TrendMend avatar May 19 '19 19:05 TrendMend

Thank you so so much!

TrendMend avatar May 19 '19 19:05 TrendMend

Hey really sorry, last last thing @KoiosLabs . I don't really use atmel studio (like at all), what file(s) did you use to open it? the atsln or cproj? and did you use the FreeExpression or FreeExpression_6_2? I don't really know the differnces..

TrendMend avatar May 19 '19 19:05 TrendMend

hold on, I am an idiot. Let me guess, 6.2 is for atmel studio 6.2? but I still dont get the atsln and cproj

TrendMend avatar May 19 '19 19:05 TrendMend

Okay found this https://www.avrfreaks.net/forum/whats-difference-2 . that clears it up for me. Sorry to bug you so much and thanks for the help!

TrendMend avatar May 19 '19 19:05 TrendMend

sorry I walked away for 5 minutes... atsln is the solution, csproj is a project typically that is inside a solution.

moral is you want the solution file, and my guess was just freeExpression.atsln, but that was just a guess...

KoiosLabs avatar May 19 '19 19:05 KoiosLabs

It works! now I got an awesome cutter! Thank you so much! That is awesome, how can I repay you?

TrendMend avatar May 19 '19 19:05 TrendMend

Dont sweat it, I was working on mine and this will only serve to help others use this project :)

KoiosLabs avatar May 19 '19 19:05 KoiosLabs