AVRDUDE supports USBasp since version 5.2. BASCOM-AVR supports USBasp since version 1.11.9.6. Khazama AVR Programmer is a Windows XP/Vista GUI application for USBasp and avrdude. EXtreme Burner - AVR is a Windows GUI Software for USBasp based USB AVR programmers. Hardware Schematic Partlist. Atmel Studio supports the complete range of Atmel AVR tools. Each new release contains the latest updates for the tools as well as support for new AVR/ARM devices. Atmel Studio has a modular architecture, which allows interaction with 3rd party software vendors. GUI plugins and other modules can be written and hooked to the system.
I'm having a bit of trouble with scanning the button inputs, maybe someone with better C skills can point out my error? My problem is that I can only seem to read inputs from button 1 and 6. I'm thinking that I am missing something at a higher level and that's causing my problem. I'll attach my code at the bottom, but in short when I try to cycle through the pins and change to the second pin it has problems.
Pretty much if I only call activatePort(PD5) once then things work fine so I'm messing it up on the next call some how. 'activatePort(PD6);' Oh this is how the buttons should work in case you don't know the board. Seems like a LOT more code than needed. If I understand. There is a pull-down on each port B pin.
Each button connects to a Port B pin and the other side of the button connects to what? A conventional way to wire this is to use pull-ups on each port pin. Each button connects to the Port pin and the other side of the buttons all go to ground. With this, you have like 2 lines of code. (there is a pull-up built into the AVRs - high value resistor. OK if wires are short.) In your case or the above, you have to de-bounce the buttons. That's another subject.
The 'BV' macro in GCC became obsolete quite a while ago. Not supported in the last few releases.
I prefer coding with the obvious: BV(3) is the same as this constant: (1. Each button connects to a Port B pin and the other side of the button connects to what? From my understanding, (and the ) it looks like all 6 buttons connect to 3 pins on portB, when you activate one pin it allows the other end of a couple of the pins to complete the circuit back to one of the two inactive pins. Honesty it makes more since when you look at the schematic, that's how I came to understand it as well. Because of this it seems that you have to quickly cycle through the pins providing voltage to one at a time and checking the other 2 pins for a 1. This dev board seems to be the only AVR board with this button config, the 128 version has a nice simple 5 button to 5 pins.
Oh how do you debounce the buttons? I guess that's what my code is, unsuccessfully attempting? BTW, thanks for the tip on theBV, I thought it was an odd function to exist, purging. Looking at the schematic - I see. The 6 buttons are multiplexed on 3 I/O pins, so you have to scan them.
Switch debouncing - best done with special hardware chip. Next best is a simple algorithm that goes something like this. Set a variable that remembers the prior state of the switch(es). Start with all 'false'.
When a switch apparently changes state (mismatches the prior state), then wait x amount of time then see if it is still in the same changed state. If not, ignore the whole thig. The value of x depends on how cheap/crummy the buttons are, like 100 mSec or so. Another technique is. Scan/poll until a switch changes state.
Then delay x. Then loop for y amount of time and confirm that it remains unchanged (not bouncing).
If it doesn't change state, it's validated. In either case, you update the variable that remembers the changed state for next time, e.g., to detect when the button is un-pressed. There are far more elaborate schemes using interrupts and not needing processor looping. Hope this helps. I guess I should post some example code of my own design.