Help - Search - Members - Calendar
Full Version: Avr Rf - Rapid Fire With Changable Waveshape
Scenyx Entertainment Community > Xbox360 Forums > Xbox360 Hardware Forums > Xbox360 Case / Hardware Modding
Pages: 1, 2, 3
stonefoz

Normal rapid mods simply, are easily detectable at MS. The only swap between absolute highest and absolute lowest range that the trigger can make. There is no middle, simply on, or simply off.

Now I present the mod that makes all that obsolete.
It's what's in chunkierdonkey's secret stash, it makes wild amounts of noise at much higher firerates that'll ever be allowed, and using a simple capacitor, get's rid of the noise, leaving the mod able to make any signal the controler would ever be expecting, saw tooth wave, sin wave, you name it.

Best of all, no crazy hex codes, tables and figures to find out how to set the fire rate. Just make with 1350, and it fires at 13.5 a second. With two decimal points accuracy, any rate from nothing up to around 60.

Using the AVR tiny45,

http://rapidshare.com/files/264177733/tinyfuz.zip.html
MD5: 68CF51464308F6957FB50B3E9F681181

I'm considering this project done, and am currently working on using this newer design to produce a chip that also does button combos.

ChunkierDonkey
Nice Stoney but you forgot TA-dah cool.gif Now any questions?
Mhawk134
Is this tested virus free? Also does it work on a sleeper installed chip using hazers version?

Hawk
Gfaja
Ugh rapidshare sucks. Use megaupload. I actually can't download it to check it out. Why did you use avr over pic? that's going to piss a lot of people off tongue.gif
ChunkierDonkey
QUOTE(Gfaja @ Aug 5 2009, 08:20 PM) *

Ugh rapidshare sucks. Use megaupload. I actually can't download it to check it out. Why did you use avr over pic? that's going to piss a lot of people off tongue.gif

Cause it mine and avr's are better. Check them out before you write'em off
Gfaja
QUOTE(Mhawk134 @ Aug 5 2009, 08:17 PM) *

Is this tested virus free? Also does it work on a sleeper installed chip using hazers version?

Hawk

Source is included.. and you don't run anything on your PC... don't worry.

Props on making it open source. Don't really understand the code yet (used to pics) but I'm going to look into it a bit at work tomorrow and I'm sure I'll be impressed.
gersey
is there anyway to make this work with the sleeper setup?
ChunkierDonkey
QUOTE(gersey @ Aug 5 2009, 08:45 PM) *

is there anyway to make this work with the sleeper setup?

Yep, but I'm working on other things and it's open source I was gonna wait till I get the macros lined out and clean it up a bit but here it is and I like that thank Stonefoz for the work he put in and posting it for me. Not bad for a couple of Kentucky carpenters, if I say so myself.
Jonuis
Thank the lord this is in C. Thank the lord.

2 questions:

1. I see several of this tssop's (if that is what they are). Any particular model? How about this one?

http://mouser.com/Search/ProductDetail.asp...RTOlx1CkBXXGWZD

2. When you say put a cap between trigger and ground in the instructions, do you mean before the resistor? Not sure how you mean.
Jonuis
O sorry forgot to ask what you flash this with. Will the JDM work with winpic for this chip? Or what should we use?

Will this programmer work?

http://www.adafruit.com/index.php?main_pag...;products_id=46
ChunkierDonkey
QUOTE(Jonuis @ Aug 5 2009, 10:13 PM) *

Thank the lord this is in C. Thank the lord.

2 questions:

1. I see several of this tssop's (if that is what they are). Any particular model? How about this one?

http://mouser.com/Search/ProductDetail.asp...RTOlx1CkBXXGWZD

2. When you say put a cap between trigger and ground in the instructions, do you mean before the resistor? Not sure how you mean.


I write code, so I'll take no offence to any thing left poorly explained,

The ttsop is the really really small version, i don't think you wish to solder that, get p-dip8, other than that, they are all the same.

it goes,

chip
|
V
resistor 330 ohm
|
V
trigger point
|
V
cap .1uf, anything above 3volt rating, closer two three, the better.
|
V
ground, above trigger point.

stonefoz
QUOTE(Jonuis @ Aug 5 2009, 10:47 PM) *

O sorry forgot to ask what you flash this with. Will the JDM work with winpic for this chip? Or what should we use?

Will this programmer work?

http://www.adafruit.com/index.php?main_pag...;products_id=46


That'll do it

For something cheaper, you can use
http://www.bsdhome.com/avrdude/
just hook up a few wires strait to a parallel port

Or if you're computer doesn't have a parallel port
http://www.adafruit.com/index.php?main_pag...;products_id=26
8USD

it's the simplest serial programer, it does however require a 5.1 zener diode, so you'll more than likely have to make an order somewhere.

Get a copy of winavr at winavr.sourceforge.net, it has everything needed to compile the firmware from source and a copy of avrdude, the program

In case you're not quite well versed with the command line, there is a simpler to use program

http://code.google.com/p/avrdude-gui-net/

it'll run avrdude for you, without having to type in the commands.


One last thing,

With the programer running, the chip has to be setup,
the two configuration settings are
Low FUSE: 0xD3
High FUSE: 0xDF

It's not commented in the source, it runs on it's own clock and sets it to defaults.

I've already gotten a complaint about using rapidshare, so it how has it's own page

HickLabs.com

It has the current firmware and source, next step is adding some photos, but it's in the works.
xb2000
QUOTE(stonefoz @ Aug 6 2009, 12:25 AM) *

Normal rapid mods simply, are easily detectable at MS. The only swap between absolute highest and absolute lowest range that the trigger can make. There is no middle, simply on, or simply off.

Now I present the mod that makes all that obsolete.
It's what's in chunkierdonkey's secret stash, it makes wild amounts of noise at much higher firerates that'll ever be allowed, and using a simple capacitor, get's rid of the noise, leaving the mod able to make any signal the controler would ever be expecting, saw tooth wave, sin wave, you name it.

Best of all, no crazy hex codes, tables and figures to find out how to set the fire rate. Just make with 1350, and it fires at 13.5 a second. With two decimal points accuracy, any rate from nothing up to around 60.

Using the AVR tiny45,

http://rapidshare.com/files/264177733/tinyfuz.zip.html
MD5: 68CF51464308F6957FB50B3E9F681181

I'm considering this project done, and am currently working on using this newer design to produce a chip that also does button combos.


stonefoz/chunkierdonkey, great work!!! I'm gonna read up on avr programming when i have time.

Are you saying the AVR output signal is analog and therefore undetectable by the games. If thats the case, please could you upload a vid showing 30 shots per second in cod5?
Its quite a statement given that we don't know what treyarch uses for it detection.

jamz_az
QUOTE(xb2000 @ Aug 6 2009, 05:14 AM) *

stonefoz/chunkierdonkey, great work!!! I'm gonna read up on avr programming when i have time.

Are you saying the AVR output signal is analog and therefore undetectable by the games. If thats the case, please could you upload a vid showing 30 shots per second in cod5?
Its quite a statement given that we don't know what treyarch uses for it detection.


From the statements above I never see them say it was undetectable.

And why do you need a resistor and cap to clean your PWM signal out?

Still nice to see something new on the RF side of mods here.
stonefoz
QUOTE(jamz_az @ Aug 6 2009, 11:48 AM) *

From the statements above I never see them say it was undetectable.

And why do you need a resistor and cap to clean your PWM signal out?

Still nice to see something new on the RF side of mods here.


PWM, the micro is clocked at 6mHz and the pin changes every 255 clocks, every time. The avr has hardware on chip to do this. So our mod is changing the wire over 20,000 times a second. Now we can change how long it keep the pin low, and how long it keep the pin high, so it' averages higher or lower

it turns on every 255 clocks, but turns off after some number set by software, so it may instantly turn off or wait the entire time and in essence just be on.

Any filter that will cut out signals over 20,000Hz will leave a cleaner wave shape that can be drawn in software,

Right now it makes sin waves, I'm experimenting to find a more optimal shape.

In reality, with this setup, any signal the other mods are doing, could just be typed into the table, and volia, it'll play it back, at any speed, up to two decimal points of presision 12.98, 12.97 per sec, easily editable.

Yes, this mod needs a cap, on the matrix board, 570ohm, with 10uF is working, but I'm working on finding a more optimal solution.

On a side note, this is using a hardware generator, and while not quite optimal yet, the chip is spending over half of it's time asleep, waiting on the timer to wake it back up. It's difficult to measure, I don't have an averaging amp-meter, but it doesn't have any noticeable effect on battery usage so far.

Julets
I have a few more questions.

1. Where in Kentucky?:-) Kentucky here as well.

2.0 How much room is left to add more functions? ~2K?

2.1 Is there a software emulator for tiny45? I don't have the programmer yet but would like to play.

2.2. Is there a good reference for beginners dealing with tiny45 and C? One that is like a embedded hello world.

3. Which variables should one use to add a 3 shot burst function? Looks like to me I would just add the functions and call them from main();. However, it looks like I would have to recreate the readbuttons() function. Would this work along the lines of something like (but I'm sure this is wrong)...

CODE
void readbuttons_burst(void)
{
#ifdef DEBUG
    uint32_t stepcopy;

    /* Helps with debugging */
    /* ISR never writes */
    stepcopy = ratectl.step;

    if (BUTTONIN & _BV(PIN_SLOW))
    {
        for (i = 0; i < 3; i++ )
        {
            if (stepcopy-CTL < stepcopy)
            stepcopy-=CTL;
        }
    }
    if (BUTTONIN &  _BV(PIN_FAST))
    {
        if (stepcopy+CTL < (0xFFFFFFFFl>>2))
            stepcopy+=CTL;
    }
    */
    /* throw dice */
    /* worst case we access while in isr and one phase
    (1/32)second is jittered */
    ratectl.step=stepcopy;
#endif
}


Maybe a for loop for the value of stepcopy? Sorry, I've had some time off in C and am trying to wiggle back in. I'm not sure what PIN_FAST/PIN_SLOW are and many other things obviously. But, if I could figure out what to play with, I'd might be able to manage. However, again, if I figure that out, I'm still in deep. Deeper in fact because I have never dealt with setting up control functions to change states/modes to something like continuous or burst fire using the tact switches.

Looks like you are big on sigint, that's very handy :-). A lot of jobs out there right now with government contracts looking for someone like you. Several in Cincinnati/Columbus for siginit, seen one posted in Hebron Kentucky earlier this year even. Any ways, I'm straying way off...

Thanks for the work. I hope to be able to do something with this. I was earlier this year (for the first time) working with ASM with gPhoto, but gave up to soon due to the ASM dealings with my Nikon (wish I hadn't, or I'd be versed).
stonefoz
QUOTE(Julets @ Aug 6 2009, 05:02 PM) *

I have a few more questions.

1. Where in Kentucky?:-) Kentucky here as well.

2.0 How much room is left to add more functions? ~2K?

2.1 Is there a software emulator for tiny45? I don't have the programmer yet but would like to play.

2.2. Is there a good reference for beginners dealing with tiny45 and C? One that is like a embedded hello world.

3. Which variables should one use to add a 3 shot burst function? Looks like to me I would just add the functions and call them from main();. However, it looks like I would have to recreate the readbuttons() function. Would this work along the lines of something like (but I'm sure this is wrong)...

CODE
void readbuttons_burst(void)
{
#ifdef DEBUG
    uint32_t stepcopy;

    /* Helps with debugging */
    /* ISR never writes */
    stepcopy = ratectl.step;

    if (BUTTONIN & _BV(PIN_SLOW))
    {
        for (i = 0; i < 3; i++ )
        {
            if (stepcopy-CTL < stepcopy)
            stepcopy-=CTL;
        }
    }
    if (BUTTONIN &  _BV(PIN_FAST))
    {
        if (stepcopy+CTL < (0xFFFFFFFFl>>2))
            stepcopy+=CTL;
    }
    */
    /* throw dice */
    /* worst case we access while in isr and one phase
    (1/32)second is jittered */
    ratectl.step=stepcopy;
#endif
}


Maybe a for loop for the value of stepcopy? Sorry, I've had some time off in C and am trying to wiggle back in. I'm not sure what PIN_FAST/PIN_SLOW are and many other things obviously. But, if I could figure out what to play with, I'd might be able to manage. However, again, if I figure that out, I'm still in deep. Deeper in fact because I have never dealt with setting up control functions to change states/modes to something like continuous or burst fire using the tact switches.

Looks like you are big on sigint, that's very handy :-). A lot of jobs out there right now with government contracts looking for someone like you. Several in Cincinnati/Columbus for siginit, seen one posted in Hebron Kentucky earlier this year even. Any ways, I'm straying way off...

Thanks for the work. I hope to be able to do something with this. I was earlier this year (for the first time) working with ASM with gPhoto, but gave up to soon due to the ASM dealings with my Nikon (wish I hadn't, or I'd be versed).


"step" is added to the phase accumulator every clock tick, and the phase acumulator is rounded off to the first 5, most significant digits. The faster we add, the faster we get to the next place in the table, the higher the rate or fire. I copy step out to a local copy, since it has to be volatile , both the timer and the main loop are working with that number, at the same time. Making a local copy speeds things up, and if needed, some places have to stop the timer momentarily to insure variables aren't modified by the timer before it's finished.

While debuging it, I had the code running on an mega16 chip, way too big to actually fit in the controler, and doesn't run on 2volt, but make for an easier platform for developing. I left it in there as a guide on how to change the frequency, and read pin values.

Emulating the avr is easiest to do with the official tools from atmel, astudio is a free download. It's their IDE, assembler, and simulator. Doesn't do c, but it does integrate with winavr, a both free and opensource compiler.

As for space, the tiny45 has more than enough, I plan on splicing into the usb cable, using the last 1k of memory for a usb-bootloader and leaving the other 3k for program. Right now it's using 681 bytes, anything less than 3000 will let me add a bootloader, using usb, and the entire program should be able to be changed in place. So for what it's doing, the tiny45 is overkill, but didn't want to start on an underpowered chip.

Julets
QUOTE(stonefoz @ Aug 6 2009, 07:46 AM) *


Or if you're computer doesn't have a parallel port
http://www.adafruit.com/index.php?main_pag...;products_id=26
8USD

it's the simplest serial programer, it does however require a 5.1 zener diode, so you'll more than likely have to make an order somewhere.




The kit came with 3 resistors and 3 diodes. Which diode should be a 5.1v?

ChunkierDonkey
QUOTE(Julets @ Aug 9 2009, 05:49 PM) *

The kit came with 3 resistors and 3 diodes. Which diode should be a 5.1v?

All three, here is a tut should be a easy SpokePOV and slide your mouse over the pics to see notes
Julets
Thanks. I'm going to build this tonight as the chips should arrive in a few hours. The zeners that came with the kit might be 5.1v. I know they are zeners at least.

I couldn't get the emulation in the studio working, or should I say I'm not sure how to make it work correctly, so I'm still at ground zero with only a few different variations of your source to try. Still looking for a good place to learn the AVR (Tiny45) specific things in C. I've found a few, but they all seem to be jump start guides for people coming off of a prior generation, so they are a bit empty in explaining what someone should already know in dealing with these. Then again, I haven't really put my full effort into it being I couldn't really test anything.

BTW, I took to your guy's code here because it was based in C. I was going to work on creating a button to hold a certain amount of resistance for a golf arcade stick. With your patterns, could this be done without something like a digital pot? Either way, it's based in C so I have a worlds of better chance of getting something faster.

Thanks again, and btw, I'm in NKY.
Julets
I'm not supposed to be able to plug the chip into this ribbon header am I?

Edit: I'll just install a socket, original message was asking what pins were what. Multimeter, DOH!
ChunkierDonkey
Ok, just let me know if need anything jester.gif
Julets
Ok, I built the programmer. Might be messed up because I only connected 5 pins of the db9 (first 3 of 5 (top row), then middle 2 of 4 (bottom row)) because I messed up de-soldering the rs232 and ripped off the contacts for the others. However, it looks like the others are not needed, unless there is a layer in the middle of PCB, then I'm SOL on this one. BTW I soldered the pins as they were from the header socket to the socket for the chip (with the help of the meter of course).

Anyhow, avrdude doesn't seem to be able to probe the com ports. In what aspect do I try to detect this? I just tried stepping through the com ports without luck.

I then tried that gui for AVRdude. Under AVRdude Gui I seen a drop down of possible programmers (which usbasp is default). I don't see SpokePOV listed, so I'm not sure what to call this.

BTW, I can't get WinAVR to do anything. I just used make clean, make all, then make hex (the ee.hex I suppose will be loaded by avrdude automatically? Probably not). I for the life of me can't figure out what WinAVR does besides bundle utilities for you and set path variables (I don't think it install any virtual ports). MFile looks like it provides nice templates though and Programmers notepad is pretty nice, but I still like Crimson editor for windows.

CODE

C:\WinAVR-20090313\bin>avrdude -c dasa -P com1 -p t45 -U flash:w:rapidfuz.hex

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


C:\WinAVR-20090313\bin>
Julets
I ordered this...

http://www.protostack.com/index.php?main_p...3bd142e8ad59ac3


Can you let me in on why they come with ribbons and not socket headers?
rjburke377
Great to finally see an AVR based solution! Instead of hand optimizing assembler you can actually use a *free* GNU C compiler to write decent code. This rocks. Thanks to the OP for sharing.

Does the shape of the waveform matter? Maybe I'm being thick but I don't get it.

/R
majinsoftware
*book marked.
Yup good to see a avr solution. I much prefer it to pic.
Well check back in a week once its been tested and all the bugs worked out before I buy a new avr programer.
stonefoz
QUOTE(Julets @ Aug 10 2009, 08:25 PM) *

I ordered this...

http://www.protostack.com/index.php?main_p...3bd142e8ad59ac3
Can you let me in on why they come with ribbons and not socket headers?


Avr's are typically programed at either factory, or left with a plug wired to them, so they can be reprogrammed where they get installed. to just program the chip, by it's self, you'll have to connect the wires

ok, you've actually picked up one of the better programmers.
The easiest to wire in is the six pin plug, half of the ten pin is just ground anyway.
On you're board there is a ISCP socket without a plug, hook wire from there to a six pin socket, or you can temporary hook then directly to the micro

AVR sixpin program,
as marked on programer
1 (VCC +5V)
2 (MOSI)
3 (SCK)
4 (MISO)
5 (RESET)
6 (GROUND)

On the tiny45 the pins are

tiny45
starting from the top left, looking at the chip, with printing facing you, count counter-clockwise.
pin 1 pb5 reset
pin 2 pb3 not connected
pin 3 pb4 not connected
pin 4 gnd not connected
pin 5 pb0 mosi
pin 6 pb1 miso
pin 7 pb2 sck
pin 8 vcc

you'll have to either, get the gui for avrdude, make a small change to the makefile, or manually write in what type of programmer you have each time.

CODE

avrdude -c usbasp -p tiny45 -e -U flash:w:tinyfuz.hex


the type is "usbasp" if you want to change the makefile, it's commented near the top, and it's the usb programmer, so it's found without specifying what port it's on.

If you're going to leave it wired up to re-program it later, I am working on adding features to the code so far, not quite polished up at the moment, if it's going to be reprogramed later without removing the chip, you have to make sure the battery is not installed while doing so. I can't guaranty it to be safe with the cheaper, serial-only, programmers. The USBasp is however safe to use without removing the chip.
stonefoz
QUOTE(Julets @ Aug 10 2009, 11:54 AM) *

Thanks. I'm going to build this tonight as the chips should arrive in a few hours. The zeners that came with the kit might be 5.1v. I know they are zeners at least.

I couldn't get the emulation in the studio working, or should I say I'm not sure how to make it work correctly, so I'm still at ground zero with only a few different variations of your source to try. Still looking for a good place to learn the AVR (Tiny45) specific things in C. I've found a few, but they all seem to be jump start guides for people coming off of a prior generation, so they are a bit empty in explaining what someone should already know in dealing with these. Then again, I haven't really put my full effort into it being I couldn't really test anything.

BTW, I took to your guy's code here because it was based in C. I was going to work on creating a button to hold a certain amount of resistance for a golf arcade stick. With your patterns, could this be done without something like a digital pot? Either way, it's based in C so I have a worlds of better chance of getting something faster.

Thanks again, and btw, I'm in NKY.


for learning the avr, especially if you plan on working in c, winavr is a collection of utilities that everything else runs in background. Atmel hasn't made a c compiler for their chips, only made a micro that would have been friendly for someone else to do so. At it stands, there's asm, hi-tech c - free trial, and winavr for free. Winavr is really a collection of many smaller projects, but for the best examples of working code,
[url]
http://www.nongnu.org/avr-libc/
[/url]
it's the library that sits between almost any code wrote, and the chip it's self. Most importantly, they have some very well described examples, from simple to almost extraordinarily
[url]
http://www.nongnu.org/avr-libc/user-manual/group__demos.html
[/url]

Let me work a few bugs out of my lastest additions and I'll ship it out with a "project file" for avrstudio. If you wish to run it in a simulator, it's the easiest to use once its up and running, and I know it's a daunting task to get all the settings lined up the first time.

Protolisk
Hey how does coding for a AVR compare to a PIC?
rjburke377
QUOTE(Protolisk @ Aug 11 2009, 04:23 AM) *

Hey how does coding for a AVR compare to a PIC?

It's very close. The major difference is that AVR devices are typically faster, more memory, more eeprom, more flash. So, unless you're using a really small device, you can program them in C instead of assembly. There's an entire free tool-chain from AVR and GNU.

Having used both I prefer the AVR chips. PIC is dead to me :-)

/R
rjburke377
QUOTE(stonefoz @ Aug 5 2009, 07:25 PM) *

It's what's in chunkierdonkey's secret stash, it makes wild amounts of noise at much higher firerates that'll ever be allowed, and using a simple capacitor, get's rid of the noise, leaving the mod able to make any signal the controller would ever be expecting, saw tooth wave, sin wave, you name it.

The PWM pulses are bigger than 1.8V right? Do any of these high voltage pulses make their way to the trigger's wiper or does the RC charge-pump store them in the capacitor? I think I'll build this on a breadboard and take a peek on an oscilloscope.

This is a cool way to do digital-to-analog conversion and is 100X cheaper than using a real DAC.

/R
Protolisk
Oh ok thanks. Is C a lot easier to code than ASM?
Gfaja
Yes, WAYYYYYYY easier.
stonefoz
QUOTE(Protolisk @ Aug 11 2009, 04:23 AM) *

Hey how does coding for a AVR compare to a PIC?


AVR and PIC both have several types of memory available, flash, eeprom, and ram

AVR, unlike the pic, doesn't further split them down into banks, on the pic, the programer has to switch banks and keep track of several things to access the entire chip. This is supposedly to speed up interrupt timers, and if written in asm, there is response times of a few clock cycles. In order to do any heavy calculations on a timer, the avr runs it's timers in the same space as any other program at the cost of a few clock cycles. Not really an issue for the application, whether there's 4millionthns of a second delay or a few dozens. If you could hit the button fast enough to worry about this, you wouldn't need a rapid fire mod.

stonefoz
Ok, so I've strung everyone one long enough, I've been cleaning up the code a bit.

Currently I'm developing on the Mega16, only because it has many more pins, I can use it to blink lights and such, just to see what I can get away with, and shrunk it down to the tiny45 so it'll fit inside of a controller.

[url]
http://hicklabs.com/rapidfuz.zip
[/url]

it's the current working code, I haven't yet checked it out on a tiny45 yet, need to go borrow a game from a buddy first, but it does have the "*.aps" file included this time. If anyone is wanting to check out the code in a simulator, read through the code, etc. this is currently the one to get. "*.aps" files load up in avrstudio and then it's just point and click. If you have an exotic programer, you're still stuck with avrdude, since the official tools only support atmels equipment, not really and issue, just run the make file, only two lines need be changed.

Thank you everybody for the feedback, I'm working on polishing this up, the generator works, and with a few stumbling blocks so far, I'll make this a bit easier to follow, if anyone is trying to duplicate it.
rjburke377
Anyone who wants to know WTF this circuit is all about can go here:

http://www.evilmadscientist.com/article.php/avrdac

There's also a good book called:

Analog Circuits World Class Designs with an entire Chapter Working the Analog Problem From the Digital Domain.

Good job OP. Can't wait to see how you use this stuff.

/R
stonefoz
Ok, I've already seen one complaint, That's what I get for using freehosting,

[url]
http://hicklabs.com/projects.html
[/url]

Doesn't seem like my hosting lets me directly link to binary files, you'll just have to click through the site first.
stonefoz
QUOTE(rjburke377 @ Aug 11 2009, 05:59 AM) *

The PWM pulses are bigger than 1.8V right? Do any of these high voltage pulses make their way to the trigger's wiper or does the RC charge-pump store them in the capacitor? I think I'll build this on a breadboard and take a peek on an oscilloscope.

This is a cool way to do digital-to-analog conversion and is 100X cheaper than using a real DAC.

/R


There is no inductor or transformer, and there is no "flying capacitor" so no, it never goes outside of the rails, 0-1.8v.
It's mostly comparable to a "buck-converter" which only produces voltages ranging from gnd->supply voltage.

To make higher voltages with only a switch and capacitor, several diodes or an h-bridge is needed.

It is a real DAC, an older walkman cd-player has printed on the top of it "1-bit DAC", it's a real design, it just doesn't scale up to higher frequencies, with a limit around audio freqs only, 0-20000kHz anything higher is worth swaping to a different design. It's more than capable for a rapid fire, with the added benifit that is more adaptable and guaranteed linear within it's range. Half is always half, a quarter is always a quarter, ect.
rjburke377
QUOTE(stonefoz @ Aug 12 2009, 01:40 AM) *

There is no inductor or transformer, and there is no "flying capacitor" so no, it never goes outside of the rails, 0-1.8v. It's mostly comparable to a "buck-converter" which only produces voltages ranging from gnd->supply voltage.

To make higher voltages with only a switch and capacitor, several diodes or an h-bridge is needed.

I was more worried about the AVR supply voltage, which is greater than 1.6v, pushing the MS Chip out of spec when pulsing. The reference voltage on the trigger is 1.6v ... I said 1.8v but that's my mistake. I'll read some reference materials to understand the circuit better and not waste your time.

QUOTE(stonefoz @ Aug 12 2009, 01:40 AM) *

It is a real DAC, an older walkman cd-player has printed on the top of it "1-bit DAC", it's a real design, it just doesn't scale up to higher frequencies, with a limit around audio freqs only, 0-20000kHz anything higher is worth swapping to a different design. It's more than capable for a rapid fire, with the added benifit that is more adaptable and guaranteed linear within it's range. Half is always half, a quarter is always a quarter, ect.

Yup, the maximum frequency for rapid fire is way less than 25Hz and a switching time of 50uS (20kHz) wouldn't be noticed by anyone.

This design has way more uses than just RF so I'd like to see where you take things. Good luck!

/R
Dark Master
I love the whole idea of whats being said here, but most people have a 12F683 PIC Microchip from that other 90 page document... now I'm not going to write these AVR's off, but I'm not about to spend another $30 on the chip and programming equipment.

Also, I wouldn't know how to wire this thing in... unless it is the same as the 12F683 Sleeper diagrams.

Let me know when you get it ported over to the 12F683, then I'll be able to enjoy your work even more.
ChunkierDonkey
I'm not gonna start a which is better PIC vs AVR debate, it is like kids arguing between Brabie and GI Joes. I like AVR and already have the kung fu grib action figures, If you want to send me the malibu stacy dream house I'll hook Ken up (debugger for Pic is like 400 bucks). So I'll use a coup out and just say it's faster and doing tables in asm is a pain. Modding isn't suppose to be what everybody else is doing, we posted it here to add some "fresh air" to the site, and was hoping to one day see variations that isn't my own. I doubt your gonna see this ported to the pic and for the wiring once I get done job hunting today I'll dig out my crayons and put something up (silver tastes the best).
Dark Master
QUOTE(ChunkierDonkey @ Aug 13 2009, 04:25 AM) *

I'm not gonna start a which is better PIC vs AVR debate, it is like kids arguing between Brabie and GI Joes. I like AVR and already have the kung fu grib action figures, If you want to send me the malibu stacy dream house I'll hook Ken up (debugger for Pic is like 400 bucks). So I'll use a coup out and just say it's faster and doing tables in asm is a pain. Modding isn't suppose to be what everybody else is doing, we posted it here to add some "fresh air" to the site, and was hoping to one day see variations that isn't my own. I doubt your gonna see this ported to the pic and for the wiring once I get done job hunting today I'll dig out my crayons and put something up (silver tastes the best).


I'll look for your artwork and if it looks possible, I'll look into AVR's...

Also, I've been looking into AVR programmers, and when I look at this one http://www.adafruit.com/index.php?main_pag...;products_id=26 I don't know where the hell you even plug the microchip in... Maybe someone wants to enlighten me.
Gfaja
QUOTE(Dark Master @ Aug 13 2009, 09:42 AM) *

I'll look for your artwork and if it looks possible, I'll look into AVR's...

Also, I've been looking into AVR programmers, and when I look at this one http://www.adafruit.com/index.php?main_pag...;products_id=26 I don't know where the hell you even plug the microchip in... Maybe someone wants to enlighten me.

There's just a 6 pin interface. PIC has a 5 pin for programming so it's pretty much the same, you plug that end into a head adn jump them to the correct pins
Dark Master
QUOTE(Gfaja @ Aug 13 2009, 12:03 PM) *

There's just a 6 pin interface. PIC has a 5 pin for programming so it's pretty much the same, you plug that end into a head adn jump them to the correct pins


Sounds complicated blink.gif
Julets
I just realized the place I ordered the USB programmer from is in Australia. I'm going to order another one, but I'm not sure what some things are called. I would try to redo the adafruit/DASA one, but I hot glued it, adn can't find a diagram for the circuit. Anyways, here is what I want to buy...

http://media.digikey.com/photos/Atmel%20Ph...ATAVRDRAGON.jpg

Can I hook a ZiF machine socket directly to the Dragon? I just want something compact and all inclusive to flashing the Tiny family. The Dragon appears to have a few rows that look like you could hook up a zif to it (or maybe 2).

Any recommendations welcomed. In the mean time I also ordered this, http://www.sparkfun.com/commerce/product_i...roducts_id=9231 should be here by Monday (hopefully Saturday), looks the same as the one I will be getting in a few weeks from Australia.
rjburke377
QUOTE(Julets @ Aug 13 2009, 04:37 PM) *

I just realized the place I ordered the USB programmer from is in Australia. I'm going to order another one, but I'm not sure what some things are called. I would try to redo the adafruit/DASA one, but I hot glued it, adn can't find a diagram for the circuit. Anyways, here is what I want to buy...

Ya, I got that one. It works great. It is based on usbasp design.
QUOTE(Julets @ Aug 13 2009, 04:37 PM) *

http://media.digikey.com/photos/Atmel%20Ph...ATAVRDRAGON.jpg
Can I hook a ZiF machine socket directly to the Dragon? I just want something compact and all inclusive to flashing the Tiny family. The Dragon appears to have a few rows that look like you could hook up a zif to it (or maybe 2).

No. This is a development platform from AVR. Unless you want to be messing with your own code and testing new ideas and stuff ... this is overkill.
QUOTE(Julets @ Aug 13 2009, 04:37 PM) *

Any recommendations welcomed. In the mean time I also ordered this, http://www.sparkfun.com/commerce/product_i...roducts_id=9231 should be here by Monday (hopefully Saturday), looks the same as the one I will be getting in a few weeks from Australia.

SparkFun's is good. It is based on the usbtiny design. Really inexpensive. Good find. There are cheaper ones that use a serial port at USD$7 but I prefer USB.
QUOTE(Dark Master @ Aug 13 2009, 03:19 PM) *

Sounds complicated blink.gif

No.

/R
ChunkierDonkey
I think Julets is planning on developing and debugging. If that's the case than the dragon is what you what, to everybody else yes that is overkill you don't need it, julet there are other options but you found a hell of a card and yes those blank spots on the bottom are for adding Zif and more, if the intent is just for rapid fire your turning a mole hill into a mountain but if coding is going to be a hobby and this isn't the only thing your ever gonna do with mirco controllers than the dragon is a good investment and it's got a picture of a dragon on it, that's just cool none of my other toys came with a dragon on it. To everybody, this is a developer if you don't know how code, will never code, or just hunting for a one time fix this is a waste of money.
rjburke377
I'm trying to follow the code. In general I get what is happening but following line-by-line I get a bit confused.

Summary : Fast PWM is being used. The timer initial value is loaded from a table indexed using the most significant byte of a 32 bit accumulator, modulo the table width. The timer counts upwards from the table value until overflow .... which triggers the interrupt routine. The table values approximate a sine wave.

The ISR also sets a flag every 255 timer interrupts to do housekeeping (TBD). Is this right ... does the counter go upwards?

I'd like to prototype this circuit on my breadboard and see if it works for trackball -> thumbstick conversion. Should be fast enough since the trackball only does 200 samples / second.

In the void ioinit(void) function I see:

CODE

    TCCR0A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM01) | _BV(WGM00);


The TCCR0A register doesn't match the COM1A1, and COM1B1 bit vectors specified in the ATtiny25/45/85 Datasheet Register Summary. Am I using the wrong part? Any help is gratefully appreciated.

/R
stonefoz
QUOTE(rjburke377 @ Aug 14 2009, 03:58 AM) *

I'm trying to follow the code. In general I get what is happening but following line-by-line I get a bit confused.

Summary : Fast PWM is being used. The timer initial value is loaded from a table indexed using the most significant byte of a 32 bit accumulator, modulo the table width. The timer counts upwards from the table value until overflow .... which triggers the interrupt routine. The table values approximate a sine wave.

The ISR also sets a flag every 255 timer interrupts to do housekeeping (TBD). Is this right ... does the counter go upwards?

I'd like to prototype this circuit on my breadboard and see if it works for trackball -> thumbstick conversion. Should be fast enough since the trackball only does 200 samples / second.

In the void ioinit(void) function I see:

CODE

    TCCR0A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM01) | _BV(WGM00);


The TCCR0A register doesn't match the COM1A1, and COM1B1 bit vectors specified in the ATtiny25/45/85 Datasheet Register Summary. Am I using the wrong part? Any help is gratefully appreciated.

/R


Yes, very sorry, lot's of typos needed to be fixed. Was working on it, but if I'm going to release source, release early, and often.

Anyway, this project was started on a different chip, so I've had to change the defines, and it's now posted up on hicklabs.com again. Current working code is verified this time to work on tiny45 with 5 modes.

I had said at the begining, this is a project in the works, starting with only the signal generator. It's now at the level of most other mods, 5 modes with zero being off.
Much of the code has been cleaned up and I'm making a todo list right now.

Recap, the code's been verified on the correct chip, now has five modes and has only so far been tested as a non-sleeper mod.

Next so far is draw up some pictures and perhaps take a few photos, I know not everyone want's to double check datasheets.

http://hicklabs.com/projects.html

Julets
The flasher that is usbasp from Australia came today ( http://www.protostack.com/index.php?main_p...3bd142e8ad59ac3 ).

However, I looked at what you listed as the pinouts on page 2, but I didn't understand which side you started on exactly, so I used these (but do I have to connect all the ground lines for the 10pin, or just 1? I did just 1)....

http://www.evilmadscientist.com/images/art...getboards_1.jpg
http://www.evilmadscientist.com/images/art...getboards_2.jpg


I'm getting this back from avrdude...

CODE

C:\rapidfuz>avrdude -c usbasp -p t45 -e -U flash:w:rapidfuz.hex

avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


I'm not sure exactly how to tell if I need the 6 pin or 10 pin, so I used the 10 pin. That is what this USBAsp is right...10pin? Also, do I have to supply power (2 AA's I assume) to the target? In this case, the target is a socket, with the tiny45 in it. I took the wires straight from the ribbon header to the socket (I just pushed wire into the ribbon header holes and soldered them to the socket).

Also, does the AVR Dragon require you to supply it power? I can't figure out what exactly the USB on that Dragon does, power and data to target or just power the Dragon itself.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.