Hobby Components 8x8x8 Cube Kit (HCKITS0050)

Hobby Component self build kits
ILYBTodd
Posts: 44
Joined: Mon Nov 05, 2018 6:20 pm

Re: Hobby Components 8x8x8 Cube Kit (HCKITS0050)

Post by ILYBTodd » Sun Jan 31, 2021 12:08 pm

No, I didn't know about the "Old Bootloader" trick.

I gave it a try but no luck. I tried swapping RX & Tx as shown on Sparkfun FTDI Basic site also still not apparent communication. See a few flashes of RX/Tx LEDs on the FTDI then nothing for a period then a single flash that repeats with a long delay in between.

Curious what I might have done to mess up the ATMega328P. Seems to only work as an UNO board and only with the "Upload using programmer" trick employed.

If I use a new ATMega328P, do I need the bootloader loaded? If so, do I have to burn the bootloader in any special way to get it to work as a Nano? I'm not understanding that aspect.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 8x8x8 Cube Kit (HCKITS0050)

Post by andrew » Mon Feb 01, 2021 11:02 am

When you upload using your programmer and the 'Upload using programmer' method in the ARduino IDE (which is uploading via the ICSP interface) you can only either upload a sketch or the bootloader, but not both. When you upload one it overwrites the other. So if you uploaded a sketch into the IC using this method it's likely you've overwritten the bootloader which is why you wont now be able to upload sketches to it in the normal way.

To fix this you'll need to upload the bootloader first via you programmer by selecting Tools->Burn bootloader. When you do this make sure you have the board type selected as 'Arduino Nano' and processor as 'ATMega328p (Old bootloader) under the tools menu so that it flashes the correct bootloader version.

Once you have done this you can then try uploading a sketch via your USB adaptor in the normal way.

This will also work for blank ATMega328's
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

ILYBTodd
Posts: 44
Joined: Mon Nov 05, 2018 6:20 pm

Re: Hobby Components 8x8x8 Cube Kit (HCKITS0050)

Post by ILYBTodd » Tue Feb 02, 2021 12:04 am

andrew wrote:
Mon Feb 01, 2021 11:02 am
When you upload using your programmer and the 'Upload using programmer' method in the ARduino IDE (which is uploading via the ICSP interface) you can only either upload a sketch or the bootloader, but not both. When you upload one it overwrites the other. So if you uploaded a sketch into the IC using this method it's likely you've overwritten the bootloader which is why you wont now be able to upload sketches to it in the normal way.

To fix this you'll need to upload the bootloader first via you programmer by selecting Tools->Burn bootloader. When you do this make sure you have the board type selected as 'Arduino Nano' and processor as 'ATMega328p (Old bootloader) under the tools menu so that it flashes the correct bootloader version.

Once you have done this you can then try uploading a sketch via your USB adaptor in the normal way.

This will also work for blank ATMega328's
Well, I'm baffled. Or maybe I'm a chip killer, who knows.

I have two spare 328P's I bought with the intent of using them on my next 4x4x4 I was planning on building with a socket for them as an option. I was able to burn the Nano 328 "old bootloader" but could not load the sketch. Resorted to popping the chip off my UNO clone and uploaded the sketch to one but not the other. So now I have two chips running my modified demo sketch and I think with one running the UNO bootloader and the other running the Nano bootloader. I'm afraid to risk bricking or messing up my original so maybe best to leave good enough alone at least until I get a new chip or two without bootloaders on them to start fresh. I feel another HC order coming on. :-)

Why the Nano bootloader by the way? I'm not familiar with why that is an advantage for running a cube like this.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 8x8x8 Cube Kit (HCKITS0050)

Post by andrew » Tue Feb 02, 2021 9:27 am

Well, I'm baffled. Or maybe I'm a chip killer, who knows.
I'm afraid to risk bricking or messing up my original so maybe best to leave good enough alone at least until I get a new chip or two without bootloaders on them to start fresh.

Don't worry about bricking it, it's not possible to do that with what your trying to do. It's just likely you're just getting one of the steps wrong.


I have two spare 328P's I bought with the intent of using them on my next 4x4x4 I was planning on building with a socket for them as an option. I was able to burn the Nano 328 "old bootloader" but could not load the sketch.

Hmm, If you've managed to successfully flash the correct bootloader I really don't know why it wouldn't work. You just need to make sure you have these setting under the tools menu in the IDE:

Board: "Arduino Nano"
Processor "ATMega328p (Old bootloader)
Port: The COM port of your USB to serial adapter.

Are you also connecting the DTR line from your adapter to the cube?


Why the Nano bootloader by the way? I'm not familiar with why that is an advantage for running a cube like this.

The Arduino Nano is basically just an ATMega328p with a separate USB to serial adapter IC (in the Arduino Nano's case its an FTDI chip). As this is basically the same hardware configuration when you're programming one of the cubes with a USB to serial adapter that's why we flash it with the Nano bootloader. In fact the bootloader for any Arduino compatible that has a ATMega328/USB to serial IC should work. For example the pro mini bootloader.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

ILYBTodd
Posts: 44
Joined: Mon Nov 05, 2018 6:20 pm

Re: Hobby Components 8x8x8 Cube Kit (HCKITS0050)

Post by ILYBTodd » Tue Feb 02, 2021 11:22 am

andrew wrote:
Tue Feb 02, 2021 9:27 am
Well, I'm baffled. Or maybe I'm a chip killer, who knows.
I'm afraid to risk bricking or messing up my original so maybe best to leave good enough alone at least until I get a new chip or two without bootloaders on them to start fresh.

Don't worry about bricking it, it's not possible to do that with what your trying to do. It's just likely you're just getting one of the steps wrong.


I have two spare 328P's I bought with the intent of using them on my next 4x4x4 I was planning on building with a socket for them as an option. I was able to burn the Nano 328 "old bootloader" but could not load the sketch.

Hmm, If you've managed to successfully flash the correct bootloader I really don't know why it wouldn't work. You just need to make sure you have these setting under the tools menu in the IDE:

Board: "Arduino Nano"
Processor "ATMega328p (Old bootloader)
Port: The COM port of your USB to serial adapter.

Are you also connecting the DTR line from your adapter to the cube?


Why the Nano bootloader by the way? I'm not familiar with why that is an advantage for running a cube like this.

The Arduino Nano is basically just an ATMega328p with a separate USB to serial adapter IC (in the Arduino Nano's case its an FTDI chip). As this is basically the same hardware configuration when you're programming one of the cubes with a USB to serial adapter that's why we flash it with the Nano bootloader. In fact the bootloader for any Arduino compatible that has a ATMega328/USB to serial IC should work. For example the pro mini bootloader.
"Well I'll be." I tried loading the Nano bootloader using my shield one more time. Using the Nano with "old bootloader" and correct COM, the bootloader loaded no problem. The sketch however would not load using the shield on the UNO clone. Got the error light right away.

I was ultimately able to load the sketch by popping the IC off the UNO clone swapping the ICs and it loaded. Verified by
checking it on the cube, it appears to have worked.

Now I have three IC's all programmed with the sketch and two for sure with the Nano old bootloader. I will now move on to trying to load a modified sketch to the Nano bootloader programmed IC using the FTDI with DTR connected directly on the cube. Wish me luck.

I may have a flaw in my programming shield that only shows up when programming a 328P with a sketch but the Bootloader loaded ok so not sure if that makes any sense.

Todd

p.s. Came back to try again and like the little engine that could, I've successfully programmed a new simple sketch and then restored the complete demo sketch with all the additional bells and whistles I added all using the FTDI basic board with the DTR pin connected. Used the Nano board with old bootloader and an IC with the Nano bootloader burnt on it. All is good once again. Can't thank you enough for your patient guidance. TD

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Hobby Components 8x8x8 Cube Kit (HCKITS0050)

Post by andrew » Thu Feb 04, 2021 4:15 pm

I may have a flaw in my programming shield that only shows up when programming a 328P with a sketch but the Bootloader loaded ok so not sure if that makes any sense.

We'll glad to hear you're making progress. Unfortunately we don't sell that shield so I'm not familiar with it's workings or if there's something that needs to be done to differently to get it to upload a sketch. Anyway it looks like it did what you needed it to do to get things working.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

David470
Posts: 5
Joined: Wed Aug 31, 2022 9:23 pm

Re: USB to RS232 TTL Serial Interface Cable (HCCABL0015)

Post by David470 » Tue Oct 18, 2022 8:24 pm

Hi, i am struggling with uploading new sketch to the cube. See attached pics, Everything looks ok to me, I have installed a new driver, Arduino ide is connected to the port. But when uploading the sketch, it shows an error message " avrdude: stk500_recv(): programmer is not responding ". anyone has any suggestions how to resolve this? Also, what I find a bit strange, the cube is not showing in This PC?

Thanks,
David
You do not have the required permissions to view the files attached to this post.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: USB to RS232 TTL Serial Interface Cable (HCCABL0015)

Post by andrew » Wed Oct 19, 2022 8:23 am

But when uploading the sketch, it shows an error message " avrdude: stk500_recv(): programmer is not responding "

Hi David,

The error message you’re seeing is just a generic ‘I can’t talk to the device for some reason’ error. This could be for a number of things from a physical connection to a setting in the Arduino IDE but I’ll check the most common issues with you first....

1) Firstly I need to confirm that the cube is actually working. The cube comes with the demo sketch pre-installed so it should be playing patterns the moment you power it up for the first time. Is it actually doing that?


2) The next thing to check is the driver. Windows will automatically install a driver when you first plug the cable into the computer but this driver is broken and will not work on a Windows OS beyond Windows 7. I’m assuming as you’re posting in this thread that you have installed the correct driver but I need to confirm this. So can you confirm that you have installed the driver provided in the first post or are you using the one Windows has installed?

If it’s the latter then you will first need to completely remove the Windows driver before installing the correct one. You can do this by following the steps in this post:

viewtopic.php?p=7398#p7398


3)In the Arduino IDE you need to make sure you have the correct board type and processor selected…

In the Arduino IDE under the ‘Tools’ menu make sure you have ‘Arduino Nano’ selected as board type and ‘ATMega328p (Old bootloader)’ selected for the ‘Processor’ type.


4) The supplied USB cable doesn’t have a DTR pin which means then when uploading a sketch you need to manually reset the cube via its reset button. This has to be done at the moment the Arduino IDE switches from compiling the sketch and then starts to upload the sketch. This can be a bit tricky at first as you have to get the timing just right.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

David470
Posts: 5
Joined: Wed Aug 31, 2022 9:23 pm

Re: USB to RS232 TTL Serial Interface Cable (HCCABL0015)

Post by David470 » Wed Oct 19, 2022 3:23 pm

Briliant!! Thanks a lot for the tips. The issue was either with the selected procesor, which was ATmega328P instead of ATmega328P (old bootloader), or I havent press the reset button at the right moment. Th cube is working and displaying code as it should. Is there a option to edit certain Patterns, instead of just playing them?

Thanks,
David

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: USB to RS232 TTL Serial Interface Cable (HCCABL0015)

Post by andrew » Wed Oct 19, 2022 4:09 pm

That’s great. Glad I could be of help.

Is there a option to edit certain Patterns, instead of just playing them?
All the patterns used in the demo can be found in the HC8x8x8_Cube_Patterns.cpp file which is in the cubes library folder. You can edit this file from a standard text editor, just don’t use Windows notepad as it doesn’t get the formatting right. Instead use something like notepad++ or Visual Studio Code to edit it.

Alternatively you can create your own patterns using the library commands such as SetVoxel(x, y, z) or ClearVoxel(x, y, z) to turn leds on or off. There is more information about the library commands in the library thread here:

viewtopic.php?f=58&t=1968


Btw, as the problem was related to the cube rather than the cable, I’ll be moving these posts over to the cube thread here:

viewtopic.php?f=127&t=1969
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Kits”