USBJOY(PS2) atmega8
USBJOY(PS2) atmega8
Hi
I just built the usbjoy for ps2 controller.
I program atmega8 using the main_psx.hex.
All went well but when plug it into usb "unknown usb device" and the LED keep blinking.
The config and security bits i left it default which is "SPIEN 1, BOOTSZ1 1, BOOTSZ0 1, SUT0 1, CKSEL3 1, CKSEL2 1"
Anyone know what when wrong?
Thanks
I just built the usbjoy for ps2 controller.
I program atmega8 using the main_psx.hex.
All went well but when plug it into usb "unknown usb device" and the LED keep blinking.
The config and security bits i left it default which is "SPIEN 1, BOOTSZ1 1, BOOTSZ0 1, SUT0 1, CKSEL3 1, CKSEL2 1"
Anyone know what when wrong?
Thanks
= Your microcircuit ATmega8 is suitable, as blinks LED. A problem most likely that are incorrectly established fuses. By default ATmega8 works from the internal generator, even if you have connected the external quartz resonator 12 MHz.
The fuses in all projects PSX, PS2, SEGA, DENDY should be established CKOPT=0, BODEN=0, SPIEN=0. Others фьюзы should be "1". It is written in files Main_psx.c, Main_sega.c, Main_dendy.c. Hence, the mode of the clock generator ATmega8 from the external high-frequency quartz resonator is established.
If LED blinks, ATmega8 was programmed normally. The problems with initialization USB can be because of operational system. It is recommended WinXP (try on the other computer)
Best regards, Sergey
The fuses in all projects PSX, PS2, SEGA, DENDY should be established CKOPT=0, BODEN=0, SPIEN=0. Others фьюзы should be "1". It is written in files Main_psx.c, Main_sega.c, Main_dendy.c. Hence, the mode of the clock generator ATmega8 from the external high-frequency quartz resonator is established.
If LED blinks, ATmega8 was programmed normally. The problems with initialization USB can be because of operational system. It is recommended WinXP (try on the other computer)
Best regards, Sergey
Thanks for the answer.
Just an update, after i post the 2nd post i manage to get the ps1 controller to work(except analog stick and R3,L3 button not working) using BOOTSZ1,BOOTSZ0,SUT0 ticked(i'm using ponyprog2000)but not PS2.
After I saw ur post i ticked all fuses except BODEN and CKOPT.
Means WDTON,EESAVE,BOOTSZ1,BOOTSZ0,BOOTRST,BODLEVEL,
SUT1,SUT0,CKSEL3,CKSEL2,CKSEL1,CKSEL0 all ticked.
End up blowed both my new ATmega8(total 3 gone @@ now its more expensive then buying a ps2 to usb converter, oh well, it's hobby,so...)
For your info, i have no programming background so i don't understand what's in the source code.
I hope you can tell me exactly what fuse to tick and whats not.
Thanks again.
Just an update, after i post the 2nd post i manage to get the ps1 controller to work(except analog stick and R3,L3 button not working) using BOOTSZ1,BOOTSZ0,SUT0 ticked(i'm using ponyprog2000)but not PS2.
After I saw ur post i ticked all fuses except BODEN and CKOPT.
Means WDTON,EESAVE,BOOTSZ1,BOOTSZ0,BOOTRST,BODLEVEL,
SUT1,SUT0,CKSEL3,CKSEL2,CKSEL1,CKSEL0 all ticked.
End up blowed both my new ATmega8(total 3 gone @@ now its more expensive then buying a ps2 to usb converter, oh well, it's hobby,so...)
For your info, i have no programming background so i don't understand what's in the source code.
I hope you can tell me exactly what fuse to tick and whats not.
Thanks again.
Fuses should be established as follows:
CKOPT, BODEN - <v> checked items means programmed (bit=0),
other fuses - <> unchecked items means unprogrammed (bit=1).
These inscriptions are written in PonyProg2000 in the menu Configuration and Security Bits. If you have programmed fuses on the contrary it is necessary to use parallel programmer for ATmega8.
Best regards, Sergey
CKOPT, BODEN - <v> checked items means programmed (bit=0),
other fuses - <> unchecked items means unprogrammed (bit=1).
These inscriptions are written in PonyProg2000 in the menu Configuration and Security Bits. If you have programmed fuses on the contrary it is necessary to use parallel programmer for ATmega8.
Best regards, Sergey
Thanks Sergey!
Just order another few atmega8, but have to wait till next week.
Guess I have to learn to ask clearly before I do things blindly.
By the way, can 3 of my wrongly configured fuses atmega8 be saved?
"If you have programmed fuses on the contrary it is necessary to use parallel programmer for ATmega8." By that, is it means if i use parallel programmer, i can reprogram those wrongly configured chip?Which programmer is recommended?
Thanks again!
Just order another few atmega8, but have to wait till next week.
Guess I have to learn to ask clearly before I do things blindly.
By the way, can 3 of my wrongly configured fuses atmega8 be saved?
"If you have programmed fuses on the contrary it is necessary to use parallel programmer for ATmega8." By that, is it means if i use parallel programmer, i can reprogram those wrongly configured chip?Which programmer is recommended?
Thanks again!
I know only one programmer which implements Parallel Programming and that is the STK500. There's also a reverse engineered circuit for an STK500 available on the net, if you don't want to buy one.
What may be easier to obtain is a "parallel enabler" or whatever the name of that circuit is. It's a small parallel programmer which does nothing else than resetting the fuse values so that you can program via ISP.
If you only have bad values for the oscillator fuses, you may have luck with an external CPU clock. You need Parallel Programming only if you have either disabled RESET or ISP.
What may be easier to obtain is a "parallel enabler" or whatever the name of that circuit is. It's a small parallel programmer which does nothing else than resetting the fuse values so that you can program via ISP.
If you only have bad values for the oscillator fuses, you may have luck with an external CPU clock. You need Parallel Programming only if you have either disabled RESET or ISP.
Hi christian,
Thanks for the info. I didn't disable RSTDISBL and SPIEN as it was non check-able. I only checked WDTON,EESAVE,BOOTSZ1,BOOTSZ0,BOOTRST,BODLEVEL,
SUT1,SUT0,CKSEL3,CKSEL2,CKSEL1,CKSEL0 and once programmed the atmega8 stop to repond to the ponyprog.
I use SI Prog API serial to program the avr. So what i need is the fuse reset-ter?
I'm planning to build a better programmer like USBasp, AVR-Doper or AVRminiProg. Can those reset the avr?
Thanks!
Thanks for the info. I didn't disable RSTDISBL and SPIEN as it was non check-able. I only checked WDTON,EESAVE,BOOTSZ1,BOOTSZ0,BOOTRST,BODLEVEL,
SUT1,SUT0,CKSEL3,CKSEL2,CKSEL1,CKSEL0 and once programmed the atmega8 stop to repond to the ponyprog.
I use SI Prog API serial to program the avr. So what i need is the fuse reset-ter?
I'm planning to build a better programmer like USBasp, AVR-Doper or AVRminiProg. Can those reset the avr?
Thanks!
It is not necessary to wait for the next week .
Try to program ATmega8, having connected to the pin 9 generators on a microcircuit 74LS04 or 74HC04 with the quartz resonator 4... 8 MHz (R1=R2=1...4.7 kOm, R3=4.7 kOm, C1=1000 pF) http://u.foto.radikal.ru/0703/ae/f0d2469a5d56.gif
If not it will programmed, use Japanese parallel programmers http://elm-chan.org/works/avrx/report_e.html
On the future make the simple programmer USBasp. He allows automatically to generate a programming signal for the pin 9 ATmega8 similarly to the generator on a microcircuit 74LS04
Best regards, Sergey
Try to program ATmega8, having connected to the pin 9 generators on a microcircuit 74LS04 or 74HC04 with the quartz resonator 4... 8 MHz (R1=R2=1...4.7 kOm, R3=4.7 kOm, C1=1000 pF) http://u.foto.radikal.ru/0703/ae/f0d2469a5d56.gif
If not it will programmed, use Japanese parallel programmers http://elm-chan.org/works/avrx/report_e.html
On the future make the simple programmer USBasp. He allows automatically to generate a programming signal for the pin 9 ATmega8 similarly to the generator on a microcircuit 74LS04
Best regards, Sergey
For an NE555 oscillator, see the application example in the data sheet, e.g. http://www.ortodoxism.ro/datasheets/stm ... s/2182.pdf figure 13.
Choose R1 = 100 Ohm, R2 = 470 Ohm and C = 1 nF and you should be close to 1 MHz.
Choose R1 = 100 Ohm, R2 = 470 Ohm and C = 1 nF and you should be close to 1 MHz.