SpinSemi M16_24 project questions

Started by MetalGuy, January 29, 2018, 04:08:10 AM

Previous topic - Next topic

MetalGuy

Here's an update to the current state of the project. There are bad news and good news. The bad news are not as bad as the good are good :)
All my attempts to program the chip miserably failed. I got the USBasp programmer for couple of bucks from Ebay however the stock firmware can't do the job and needs to be flashed. The one that can allegedly program the chip can be found here:

http://www.circuitvalley.com/2011/06/usb-8051-avr-microcontroller-programmer.html

I tried using the simple serial programmer to flash the USBasp but i couldn't get it to work. So I thought if I was going to invest more time into this I needed at least to know if the whole thing is going to work and decided to put the "how to program it myself" issue to the side. A local electronic parts retailer directed me to a computer tech who could program the chip for me.
It turned out that both chips survived all my experiments and now they were ready to go into the already assembled PCB.
Now here's the good news. After powering up the board everything worked from the first time which makes official the AT89S8253 as replacement in SpinSemi's project. Credits also go to Rob who helped to compile the hex file. I'll post it later together with a PCB drawing.
What you should know if you're burning your own is there are 4 fuses that must be specified.
Fuse1 (Serial Programming Fuse): This fuse enables/disables the serial programming mode (ISP). - enable - 0
Fuse2 (x2 Mode Selection Fuse): This fuse enables/disables the internal x2 clock mode. - disable - 1
Fuse3 (User Row Access Fuse): This fuse enables/disables writing to the programmable user row. - enable - 0
Fuse4 (Clock Selection Fuse): This fuse selects between an external clock source and a quartz crystal as the clock input - select quartz crystal - 1
I haven't admitted defeat on programming the chip so after I figure out how to flash the USBasp I'll keep trying.
The module outputs only the wet signal so a buffer/mixer circuit will have to be added.
There's one small thing. When rotating the encoder clockwise the preset numbers go down and vice versa so I was wondering if this was the wrong type of encoder I'm using or I just need to swap the lines?

MetalGuy

#41
After many many hours of digging, reading and experiments I can finally declare SUCCESS!
I'm not going to describe the whole ordeal because it's a novel material but post the solution that finally worked.

1/ Hardware
Get an USBasp programmer for couple of bucks from Ebay or elsewhere. The one I got had the Atmega8A. Some of the revisions however have Atmega48 or 88. I don't
know if the new firmware works on those so maybe it will be a good idea to check with the seller first which Atmega is used in their version of USBasp.
Mine was marked as USBasp V2.0 from LC Technology.
ATTENTION! The stock firmware is not able to program the AT89S series of uCUs! In order to enable it to program the
AT89S8253 chip it needs to be flashed with a custom made firmware. The one from the link posted previosly claims
to be able to do that but in fact it doesn't. The final working solution was found on a german forum here (answer from 23.06.2009 22:16):
https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fwww.mikrocontroller.net%2Ftopic%2F140310&edit-text=
2/ Flashing the USBasp
Flash the USBasp using the firmware HEX file attached (before that you have to enter programming mode by shorting the JP2 jumper).I did that using
PonyProg and a simple serial programmer I built myself and as described and linked to earlier in the thread. Another way to do it is to buy 2 pcs USBasp that can flash each other.
Make sure you use the recommended fuse settings: Hfuse - c9, Lfuse - 9f. For direct editing of the AVR fuse bits refer to this fuse calculator:
http://www.engbedded.com/fusecalc/
3/ Interfacing USBasp to AT89S8253
To connect USBasp to AT89S8253 I built a simple 10pin connector to PLCC44 socket interface on a perfboard adding to the socket a 100n cap across positive and
negative (ground) rails and also a 6MHz crystal coupled with 2x22pf ceramic caps. The chip was powered from the 10pin connector (set the USBasp JP1 target jumper to 5V).
4/ Software
I used ProgISP v1.72.
Open the program and choose AT89S8253.
In order to define the configbits click here:

Tick them accordingly:

Click on "Command" (on the right vertical window).
To check if the software communicates with the chip click "Read flash". 
Load the SpinSemi16_24_AT89S8253.hex flash file.
In the window to the right, click "Write flash":

Done.
The chip was tested to work properly in the demo board.

The modified USBasp firmware and AT89S8253 flash file can be found here (will be deleted after 30 days so if anyone can recommend a more permanent solution let meknow):

https://ufile.io/ofxvx

I'm still working on a PCB that will fit into a 1590B enclosure and I'll post them later when I'm done.

Couple of mods to the software came to mind so I'll need your help again Rob :)






MetalGuy

#42
With the help of a friend of my friend the code was modified so when you rotate the encoder the next program becomes active without the LCD blinking and the need to press the button to activate the program. Below is a link to the modified hex file:

https://ufile.io/dwuiy

The experimental board I made wasn't able to fit it in the 1590B but it fitted very well in a 1550B.
The In/Out Mix section together with the jacks is mounted on a separate PCB.  I'm drawing another PCB that will be smaller and will have the Mix section integrated.



Rob Strand

Thanks for the update.   I missed your posts since I don't monitor this group.

You had a real battle on your hands but your persistence paid off!
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.