Hi,
I was using an ATTiny88 to control a couple of stepper motors with a serial interface board for automation purposes, and it all worked great. I was using the "Micronucleus, MH-ET t88 w/16MHz CLOCK" option, where you hit the upload button then plug in the board.
However, one day I needed to slightly tweak the program, and this method would no longer work (the IDE was never able to find the board when I plugged it in). Thinking perhaps the board had developed a fault, I tried a spare unused board, but had the same problem. It was as though perhaps windows had an update that had messed with things so that the arduino IDE no longer found the boards.
So I decided to switch over to using an UNO as an ISP, and was successful at programming the board. But now the serial interface no longer works, and the stepper motors are not working (they just buzz, as though the wires are connected wrong, but the connections have not changed: the only thing that has changed is that I am now using an UNO as ISP instead of the first method described above).
I am wondering if this is a timing issue, and whether anyone else has had an issue like this? Is the clock no longer the same now I am using the UNO ISP method? Should I be setting the clock frequency somehow?
The Tiny88 "L" LED is on 0... so if you blinked the LED on the Tiny then used the same code on the Uno, the RX is being spammed. Try to upload a "blank" sketch to the Uno by pressing/holding RESET (on the Uno) while the sketch is compiling, then release the RESET button just before "uploading" to let the new sketch upload (to the Uno). Pressing the Uno RESET button is like cycling power... the controller first looks for uploading code, then tries running anything in memory.
You are not the first today with working boards and sketches that just stopped working. Check your boards manager for the MH-ET-Tiny88 (TinyCore?).
Thanks xfpd,
my serial interface is one of those rs232 adapter boards, and I am using the SoftwareSerial interface on pins 13 and 14 of the ATTiny. This all worked previous to using the uno as ISP.
I will check my board manager as you suggest, since the stepper motors aren't working any more either, so lack of serial is the least of my problems
I have now mostly resolved this. There were two things I needed to change:
Under Tools->Clock Source+Speed (only set on bootload) I needed to select "16 MHz (external clock)" where the default was "4 MHz (internal)". I burnt the bootloader first, then programmed, and found that the steppers were working again (but not the serial).
Under Tools->Pin Mapping I needed to choose "MH-ET Tiny", where "Standard" had been the default. After I did this, the tx serial worked. There is no rx however, and I am wondering if this somehow got broken.
So at least the motors work, and maybe if I swap to another board the rx serial will also work. I have not used an ISP before, so didn't realise I needed to be aware of these extra settings.
It turns out that the serial tx only works when the device initially powers up. I noticed that pin 13 (rx) is also SCK which probably explains the rx issue as the ISP uses SCK. Pin 14 is tx - not sure if something else takes this over also.
So I finally got this to work using pins 4 and 5 for the serial, and the "Standard" pin mapping, as using the "MH-ET Tiny" mapping led to problems with the analogue output pins which I was also using.