Last month i rewrote my bool solver from scratch. This time i wrote it in pure C - without C++ elements. It has almost all functions of the old version plus some new ones, but the new program is much shorter. Documentation and comments are in german... thats why i do not upload it.
Because the old firmware (version 4) of the AtTiny clock was pretty ugly, i rewrote and changed many parts of the firmware. The new version has the number 5. The new code runs like a charm and as a bonus it eliminates the problems i had with the buttons (it was not a hardware problem).
Release will be soon. Only a calibration function for the quartz is still missing. ^.^°
And one last thing: i disassembled my old Acer travelmate 220 notbook and under the sticker of an IC i found an Atmel AtTiny25 as part of the charging circuit. It communicates directly with the laptop battery through TWI/I²C. The foto was made with my Canon EO350 / Digital Rebel XT / Kiss Digital N with an hand hold lens in retro position - the IC was so damn small:
Showing posts with label attiny. Show all posts
Showing posts with label attiny. Show all posts
Tuesday, February 22, 2011
Some current and finished projects...
Labels:
acer,
attiny,
avr,
bool solver,
boolean,
c++,
camera,
canon,
clock,
firmware,
foto,
laptop,
programming,
software,
thermometer
Saturday, April 24, 2010
Thermometer version 5
I added backlight functionality to my thermometer.
A menu system was added too (as well as an annoying bug...).
I noticed that the button response is getting worse with time and the number of button clicks. Perhaps they are just to cheap? It is not a software fault.
The possibility to calibrate the clock for higher accuracy is still missing.
A menu system was added too (as well as an annoying bug...).
I noticed that the button response is getting worse with time and the number of button clicks. Perhaps they are just to cheap? It is not a software fault.
The possibility to calibrate the clock for higher accuracy is still missing.
Thursday, February 25, 2010
Additional adaptors for the ISP

Because i'm lazy dog, i made some adapters for my self made ISP to save the in-circuit programming connector. This would save some wires, parts, space on the board and a lot of time.
Now - with those adapters - i only need to connect the right adapter to the ISP and mount the adapter onto the µC.
Programming the µC is done as usually.
The only drawback is, when the adapter is mounted on top of an µC, it is not very stable. So better don't touch the whole thing while flashing the controller.
I made one adapter for the Atmega8 (in the background) and one for the Attiny84 (in the foreground).
The big one for the Atmega8 looks a bit strange, because i had to add another DIL socket to the existing one who had to unflexible pins.
My collection of DIL sockets is very limited.
It is better to use the cheap low quality DIL sockets, because their pins can bend well.
The more expensive ones have rigid pins, so they can not be bend over the µC pins.
Since i made the adapters, i have never soldered an ISP connector into an circuit again.
And because i don't want to take the credits for this invention: i have seen such an adapter in the internet, before i made mine. Thanks to you stranger for this fabulous handiwork! ^.^
Atmel ISP
Today i want to show you my ISP adapter for Atmega and Attiny µControllers from Atmel.
I found a circuit diagram in the internet, but unfortunately it was using an 74HC244 but i had only 74HC245 laying around.
That's why i redesigned the programmer a bit, to make it work with the slightly different 245.
The adapter is compatible with PonyProg2000 and AVRDude.
Now some pictures and the final circuit diagram:




PonyProg2000: http://www.lancos.com/prog.html
AVRDude: http://www.nongnu.org/avrdude/
A GUI for AVRDude: http://avr8-burn-o-mat.aaabbb.de (german)
I found a circuit diagram in the internet, but unfortunately it was using an 74HC244 but i had only 74HC245 laying around.
That's why i redesigned the programmer a bit, to make it work with the slightly different 245.
The adapter is compatible with PonyProg2000 and AVRDude.
Now some pictures and the final circuit diagram:



PonyProg2000: http://www.lancos.com/prog.html
AVRDude: http://www.nongnu.org/avrdude/
A GUI for AVRDude: http://avr8-burn-o-mat.aaabbb.de (german)
Tuesday, February 23, 2010
Clock - some hints and thoughts
I have reprogrammed the clock-thermometer the first time after soldering it to the breadboard.
In the circuit diagram you can throw away jmp3 and jmp4 and replace them with a common jumper on the mass of D2 and R7.
Because my wall power supply not only outputs 9 V DC but also ~13 V AC, i decided to power the circuit with rechargeable batteries (4*1,2 V).
I thought it could help to change the following line:
Where ADC_BITS is defined as 10 and VREF as 1100 (mV).
Indeed the code size shrinked from 3132 bytes to 3060 bytes, but the temperature was calculated wrong. The thermometer displayed a negative temperature, although my room was warm.
When i changed the code to:
The filesize was 3132 bytes again.
As you can see: the AVR GCC port isn't as stupid as you (or me) think. ;)
Happy soldering!
In the circuit diagram you can throw away jmp3 and jmp4 and replace them with a common jumper on the mass of D2 and R7.
Because my wall power supply not only outputs 9 V DC but also ~13 V AC, i decided to power the circuit with rechargeable batteries (4*1,2 V).
I thought it could help to change the following line:
degree = (degree * VREF) >> ADC_BITS;to:
degree = ((degree * 1024) + (degree * 64) + (degree * 8) + (degree * 4)) >> ADC_BITS;
Where ADC_BITS is defined as 10 and VREF as 1100 (mV).
Indeed the code size shrinked from 3132 bytes to 3060 bytes, but the temperature was calculated wrong. The thermometer displayed a negative temperature, although my room was warm.
When i changed the code to:
degree = ((degree * 1024L) + (degree * 64L) + (degree * 8L) + (degree * 4L)) >> ADC_BITS;
The filesize was 3132 bytes again.
As you can see: the AVR GCC port isn't as stupid as you (or me) think. ;)
Happy soldering!
Monday, February 22, 2010
Clock-Thermometer with Attiny and LM35
Today i want to present you my last project i've made.
It's a more modern version of my first big µC project: a thermometer. (yeah!)
I finished it last sunday - at least the most parts of the project.
My first version i made months ago, was equiped with an Atmega8, four multiplexed 7 segment displays, "software" based USB and a batterie backup if no USB connection was in the near.
So far so good.
The negative points were:
It consumed a lot of power, it used tons of parts, it had some bugs i never killed and it only displayed the actual temperature.
I paused the project for a while.
By the time my µC skills increased and so on one day i decided to make a better version.
The requirements:
That was the hour of birth for the thermometer version 4a:

The whole circuit is build around an Attiny84V and an LM35C.
The output is done on an LC Display from Displaytech.
1x16 Chars - or more precise: 2x8 Chars in one line.
Sadly without backlight.
After making some plans for the hard- and software parts i build up the circuit on an pinboard and then i made the software.
(Usually i never make plans for the software part.)
Last step was soldering the stuff onto a bredboard as you can see in the pictures below.
Because i made a lot of plans and "brain work" in the forefront, it was a very easy and straight forward implementation. No bigger problem appeared till now.
The circuit is using a wall power supply.
It is specified with 6 V DC, 300 mA and it is from an old wirless mouse charging station.
In idle time it delivers around 9 V and because the whole circuit consumes under 15 mA it will work in idle even when the circuit is connected. ^.^
As special feature i implemented a clock (wohoo!).
With three switches on the back you can set the hour, minute and the display mode.
Display mode means the appearance of the time and temperature on the LCD:
But because it is getting warmer here outside i need some fridge to test the posibility of displaying negative values.
The build in clock is synced by an 16 MHz Quartz (CHKDIV8 is on - resulting in a clock speed of 2 MHz!).
The clock is not calibrated yet - but on the pinboard it was exact enough. Further testing with the breadboard circuit is needed.
The hardware version i soldered is a bit older than the plan.
As well as the software version.
The software is written in C with AVRStudio and WinAVR.
The main program consists of under 300 lines of code.
It uses 3132 bytes in the flash for code.
So there is plenty of room in the 8 kb flash for further extensions.
For the LCD i used the routines from Mikrocontroller.net.
(A big thanks to this side! It is just a paradise for µC users... at least when you can read german)
As soon as i figured out how to post software here i will upload it. ;)



It's a more modern version of my first big µC project: a thermometer. (yeah!)
I finished it last sunday - at least the most parts of the project.
My first version i made months ago, was equiped with an Atmega8, four multiplexed 7 segment displays, "software" based USB and a batterie backup if no USB connection was in the near.
So far so good.
The negative points were:
It consumed a lot of power, it used tons of parts, it had some bugs i never killed and it only displayed the actual temperature.
I paused the project for a while.
By the time my µC skills increased and so on one day i decided to make a better version.
The requirements:
- no batterie
- no usb
- no 7 segment display
- should display something more than just temperature...
- lesser parts
- KISS!
That was the hour of birth for the thermometer version 4a:
The whole circuit is build around an Attiny84V and an LM35C.
The output is done on an LC Display from Displaytech.
1x16 Chars - or more precise: 2x8 Chars in one line.
Sadly without backlight.
After making some plans for the hard- and software parts i build up the circuit on an pinboard and then i made the software.
(Usually i never make plans for the software part.)
Last step was soldering the stuff onto a bredboard as you can see in the pictures below.
Because i made a lot of plans and "brain work" in the forefront, it was a very easy and straight forward implementation. No bigger problem appeared till now.
The circuit is using a wall power supply.
It is specified with 6 V DC, 300 mA and it is from an old wirless mouse charging station.
In idle time it delivers around 9 V and because the whole circuit consumes under 15 mA it will work in idle even when the circuit is connected. ^.^
As special feature i implemented a clock (wohoo!).
With three switches on the back you can set the hour, minute and the display mode.
Display mode means the appearance of the time and temperature on the LCD:
- Mode 1: HH:MM:SS +/-TT,T°C
- Mode 2: HH:MM +/-TT,T°C
- Mode 3: HH:MM +/-TT°C
But because it is getting warmer here outside i need some fridge to test the posibility of displaying negative values.
The build in clock is synced by an 16 MHz Quartz (CHKDIV8 is on - resulting in a clock speed of 2 MHz!).
The clock is not calibrated yet - but on the pinboard it was exact enough. Further testing with the breadboard circuit is needed.
The hardware version i soldered is a bit older than the plan.
As well as the software version.
The software is written in C with AVRStudio and WinAVR.
The main program consists of under 300 lines of code.
It uses 3132 bytes in the flash for code.
So there is plenty of room in the 8 kb flash for further extensions.
For the LCD i used the routines from Mikrocontroller.net.
(A big thanks to this side! It is just a paradise for µC users... at least when you can read german)
As soon as i figured out how to post software here i will upload it. ;)




Subscribe to:
Posts (Atom)