Aug. 21st, 2010

alitalf: Skiing in the 3 Valleys, France, 2008 (Default)

It all works apart from the software!

 

I just need to program an Atmel ATtiny44 to measure a couple of analogue quantities and control a fast lithium battery charger, switching between off, trickle charge, and full charge, with detection of battery present, dead battery, and indication of being almost charged. There might be a use for a timeout in one section - or maybe not. Simples!

The charger even (optionally) adds negative incremental resistance to compensate for most of the resistance of the unreasonably thin battery cables. It can charge at 10A in a well controlled manner, and without getting unreasonably hot.

The software control I need is fairly simple - only a bit more complex than could have been done with something completely stateless (eg comparators and logic gates), but, in engineering of any sort, before a job can be done another must be done first, and that is indefinitely recursive. I need it finished by about mid Monday or trouble will result.

First of all I thought that the necessary software was already installed on my laptop, because I thought I had used it for something in living memory. No, the laptop failed and had everything I needed at the time re-installed, so I had to find out what things I need - which turns out to be AVR Studio and Winavr. I have an AVRISP 2 to program with which should be fine.

I have just reached the point of having upgraded its firmware to play nicely with the latest AVR Studio.

 

I do remember that there need to be some include files to make life easy, and I also remember needing to interpolate and extend the instructions in order to make that aspect of it work.

If When eventually I reach the stage that the header files are where the program expects to find them, so that the port addresses are defined and it is possible to address them by name, there will be some chance I can do the rest of it in a plausible number of hours. After all, the code needed should be simple enough that even someone out of practice like me, should be able to make it work. There is plenty of code memory, so it doesn't need to be optimised to the last instruction.

This is getting too close for comfort - I thought that both the computer and my memory were better prepared for this task. Maybe the missing bits will make sense tomorrow. As soon as I can even make the processor as much as toggle an output, I should be on the home straight.

Profile

alitalf: Skiing in the 3 Valleys, France, 2008 (Default)
Andy

May 2017

S M T W T F S
 123456
78910111213
1415 1617181920
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 9th, 2025 02:46 pm
Powered by Dreamwidth Studios