Having spent so much time reading in order to understand how to upgrade and flash my AY-AT transistor tester I decided to document as much as possible of what I've learned: https://github.com/blurpy/transistor-tester
Maybe someone else will find it useful
I already said that this was helpful, but I must say it again, when I realized that in your repository are the examples of Makefile, config.h and config328.h for the AY-AT boards.
Indeed, after repairing my board, and successfully flashing the compiled files provided by Indman, I wanted to change some options. I had then to compile the code by myself. Starting from Madires repository. But although the files are well written an documented, the multiplicity of options makes it difficult, and my first trys were not successful. Then I realized that you posted as well the config files.
Using them was immediate success. So you saved my day. Thanks again.
I'm sure that this information is somewhere in the thread, but I could not find it.
What version of the AVR toolchain generates the most compact code? Ideally the Windows version, but if there is a Linux version that generates even more compact code, I would have no problems using it
I know that different compiler versions generate code with different optimizations, and that results in binaries with different lengths
However, I still need to fix µ and Ω not showing up with the correct character on the display.
Use the flag CFLAGS + = -DLCD_CYRILLIC in the makefile
I would like to, but unfortunately I can't compile anything. Spent another evening trying to figure out how to compile and no go.
Would someone who is able to compile 1.13k for mega8 be willing to help me out with this?
GnatGoSplat look zip file
Thanks so much, that did fix the issue with the characters.
Looks like I broke it somehow though. Now it's very, very slow, doesn't respond much of the time when I press the button, and returns incorrect results for capacitors. Definitely not your build because I flashed the original one back in and it's still super slow. I have no idea what I messed up. Nothing looks broken. Weird.
Might be the fuses aren't right. I'll have to look into that.
UPDATE: It was the fuses. All is well now.
Having spent so much time reading in order to understand how to upgrade and flash my AY-AT transistor tester I decided to document as much as possible of what I've learned: https://github.com/blurpy/transistor-tester
Maybe someone else will find it useful
I already said that this was helpful, but I must say it again, when I realized that in your repository are the examples of Makefile, config.h and config328.h for the AY-AT boards.
Indeed, after repairing my board, and successfully flashing the compiled files provided by Indman, I wanted to change some options. I had then to compile the code by myself. Starting from Madires repository. But although the files are well written an documented, the multiplicity of options makes it difficult, and my first trys were not successful. Then I realized that you posted as well the config files.
Using them was immediate success. So you saved my day. Thanks again.
Nice to hear you found my documentation useful and got your tester working, that makes it worth the effort!
I'm programming my AY-AT tester and before overwriting the original 328p I tried reading the firmware (which I assumed was pointless and expected to fail due to the protection bits). But my chip was not protected, and I have a copy of the firmware and EEPROM.
I'm not sure if mine was an exception, or all AY-AT ship without protection fuses set. I thought I'd mention it in case anyone here wants a copy (just reply here and I'll copy it somewhere)
EDIT: attached as ZIP. firmware, eeprom and fuses configuration
You could also zip and attach them to your post.
I'm programming my AY-AT tester and before overwriting the original 328p I tried reading the firmware (which I assumed was pointless and expected to fail due to the protection bits). But my chip was not protected, and I have a copy of the firmware and EEPROM.
I'm not sure if mine was an exception, or all AY-AT ship without protection fuses set. I thought I'd mention it in case anyone here wants a copy (just reply here and I'll copy it somewhere)
Nice! My AY-AT had the protection bits set so I was unable to make a copy.
+1 to madires' suggestion.
More than anything, I wanted to be sure it was not something everyone had... just attached to the previous message as ZIP
More than anything, I wanted to be sure it was not something everyone had... just attached to the previous message as ZIP
Thanks!
This version for AY-AT is based on the rather outdated 1.12k from Karl-Heinz. Its only advantage is the ability to test the sensors DHT11-DS18B20 and IR Encoder-Decoder, which the Chinese added.
I'm compiling 1.39m with SW_ONEWIRE_SCAN but no IR functionality, and I'm getting a compilation error: C:\Work\AvrAYAT\ComponentTester-1.39m/display.c:407: undefined reference to `Display_HexDigit'
I think that the problem is in the following snippet in display.c
/* ************************************************************************
* display of values and units
* ************************************************************************ */
#if defined (SW_IR_RECEIVER) || defined (HW_IR_RECEIVER) || defined (SW_IR_TRANSMITTER)
/*
* display single hexadecimal digit
*
* requires:
* - value to display (0-15)
*/
void Display_HexDigit(uint8_t Digit)
{
/*
* convert value into hex digit:
* - 0-9: ascii 48-57
* - A-F: ascii 65-70
*/
if (Digit < 10) Digit += 48; /* 0-9 */
else Digit += (65 - 10); /* A-F */
Display_Char(Digit);
}
#endif
#if defined (SW_IR_RECEIVER) || defined (HW_IR_RECEIVER) || defined (SW_ONEWIRE_SCAN) || defined (SW_FONT_TEST)
/*
* display byte as hexadecimal number
*
* requires:
* - value to display (0-255)
*/
void Display_HexByte(uint8_t Value)
{
uint8_t Digit;
/* first digit */
Digit = Value / 16;
Display_HexDigit(Digit);
/* second digit */
Digit = Value % 16;
Display_HexDigit(Digit);
}
#endif
in particular
/* ************************************************************************
* display of values and units
* ************************************************************************ */
#if defined (SW_IR_RECEIVER) || defined (HW_IR_RECEIVER) || defined (SW_IR_TRANSMITTER)
should be
#if defined (SW_IR_RECEIVER) || defined (HW_IR_RECEIVER) || defined (SW_ONEWIRE_SCAN) || defined (SW_IR_TRANSMITTER)
When I make that change, it compiles without problems, but I don't understand enough of the code to know if there are any negative side effects elsewhere
AlcidePiR2 was one page faster.
It's a fault in the #ifdef management for two functions and will be fixed in the next version.
AlcidePiR2 was one page faster. It's a fault in the #ifdef management for two functions and will be fixed in the next version.
Sorry I missed it, too many posts to read
Can I assume my fix is safe?
One more question, if I may
My AY-AT seems to have a pretty bad encoder and I have problems getting double clicks to be recognized. I will replace it, but right now I don't have one handy. I'd like to lengthen the time for a double click, so that it's not such a hit or miss affair.
I looked at user.c, the TestKey function. In the following snippet:
/* determine key press type */
if (Ticks > 26) /* long (>= 300ms) */
{
Key = KEY_LONG; /* signal long key press */
}
else /* short (< 300ms) */
{
Key = KEY_SHORT; /* signal short key press */
/* check for second key press if requested */
if (Mode & CHECK_KEY_TWICE)
{
MilliSleep(50); /* delay for checking key again */
Ticks = 20; /* timeout of 200ms */
while (Ticks > 0) /* timeout loop */
{
Test = BUTTON_PIN & (1 << TEST_BUTTON); /* get button status */
if (Test == 0) /* test button pressed */
{
MilliSleep(30); /* time to debounce */
Test = BUTTON_PIN & (1 << TEST_BUTTON); /* get button status */
if (Test == 0) /* test button still pressed */
{
Ticks = 1; /* end loop */
Key = KEY_TWICE; /* signal two key presses */
MilliSleep(200); /* smooth UI */
}
}
Ticks--; /* decrease timeout */
MilliSleep(10); /* wait 10ms */
}
}
I think that if I change if (Ticks > 26) /* long (>= 300ms) */
to a value higher than 26, say 35, I should get a longer timeout for a long press to be recognized, and Ticks = 20; /* timeout of 200ms */
while (Ticks > 0) /* timeout loop */
to 25, that should give me more time to have a double click recognized.
@madires can you please let me know if I'm on the right path? It's rather inconvenient for me to remove the Atmega328p to program it and reinstall, so I'd like to minimize the amount of modify/compile/flash, if you have time to chime in. If not, I'll try it out
I think that if I change if (Ticks > 26) /* long (>= 300ms) */
to a value higher than 26, say 35, I should get a longer timeout for a long press to be recognized,
You also need to change:
if (Ticks > 26) Run = 0; /* end loop if 300ms are reached */
to the same value. With 35 the minimum time for a long button press will be (35 + 1) * 10ms + 30ms = 390ms. This is the time you have to press the button to be detected as a long button press. It doesn't have any impact on the double-press.
and Ticks = 20; /* timeout of 200ms */
while (Ticks > 0) /* timeout loop */
to 25, that should give me more time to have a double click recognized.
Yes, that will increase the timeout for the second button press (25 * 10ms = 250ms), i.e. the time in which the button has to be pressed again to be detected as a double-press.
I would very much like a copy of that firmware. i am still trying to decide which one to buy first.
I would very much like a copy of that firmware. i am still trying to decide which one to buy first.
I attached the ZIP file to my original message just after madires and blurpy's suggestion. It's a few messages before this one
I started from a standard AY-AT clone.
inspired by blurpy documentation, I made several changes after replacing the SRV05-4 which was fried.
- changed the 7550 to a MCP1702
- changed the 680R resistors to 681R 0.1%
- changed the 470 kR resistors to 475kR 0.1%
- replaced the TL431 by a MAX6126 ( see attached pict)
- replaced the 8 Mhz crystal by a 20 Mhz
- flashed the 1.39m firmware after compiling with appropriate changes in Makefile, config.h, config_328.h, in particular for
/* Rl in Ohms */
#define R_LOW 681
/* Rh in Ohms */
#define R_HIGH 475000
Everything is working, except that the perfs are quite deceptive.
I have measure several high precision resistors ( 0.01% and 0.05%)
but it seems that the precision that can be achieved is only 2% for measuring resistors.
Is this normal ?
Have you run the self-adjustment incl. the film cap procedure?
Have you run the self-adjustment incl. the film cap procedure?
I have run the items from the menu
- Test
- Adjustment
AlcidePiR2 You did it?
"Before running the self-adjustment the first time, please measure a film
capacitor with a value between 100nF and 3.3µF three times at least to let the
tester self-adjust the offsets mentioned above."
AlcidePiR2 You did it?
"Before running the self-adjustment the first time, please measure a film
capacitor with a value between 100nF and 3.3µF three times at least to let the
tester self-adjust the offsets mentioned above."
No, I did not see that. Will do it today.