That was the problem, I was using value 1 for 7135. Now it starts with a single short click.
Thanks!
I’ve changed it to 0,92,4,15,125,255 so it will start with 92, the mode I am using most. Now it is perfect
That was the problem, I was using value 1 for 7135. Now it starts with a single short click.
Thanks!
I’ve changed it to 0,92,4,15,125,255 so it will start with 92, the mode I am using most. Now it is perfect
interesting…never thought of that…a med/hi as 1st mode, then back thru to moon on up…
One more beginner question
How can I get rid of the noise, especial in medium mode?
My default setup is 9.4 kHz - "Fast PWM" at 18-19 kHz should be noise free, but I never tried it - everyone else is using it though, seems like. If you have a solid ground for the driver, nothing else you can do I would think, accept to try Fast PWM. With Fast PWM, you probably need to raise the moonlight PWM 5 value even higher, maybe 8 or 9? Not sure...
Ohh - by setting mode #1 to a medium level kind of breaks the auto battery level detection/savings, because the way JC wrote this, as the battery drains low, he auto drops down modes, so it's expecting modes to start low and go higher.
oh, I didn’t think of that…get a weak battery then drop to lowest of low mode
But it will still shut the light off at 2.80v, am I right?
P.S. Will fast-PWM (18 kHz) drain battery faster or it won’t be noticeable?
Yes, 2.8v cutoff should still work (accept in my last BLF17DD board build -- duuni wut is wrong... )
Don't think PWM rate will have any effect on power drawing, ie battery drain time.. Shouldn't, cant see how - I'm no expert though.
Yeah, sorry about that :-/
I can’t flash this one, I am getting this error at the end:
Did anybody tried to flash this STARSTROBE1.0.c
I’ve tried the .hex file that @WarHawk-AVG compilled for me but I get the same error.
I want to know it anybody tried it and succeed?
Well the Tiny13A has 1K ROM/flash, and an address of 0x410 is 16 bytes past the address range. Maybe with certain combo of compile options, you went over the 1K limit?
0x400 (hex) is 1024 decimal (1 K)
I compile it like all other .hex files, following this instructions and all works nice except for that STARSTROBE1.0.c .
Now I tried to compile STAR On-time memory v1.1 and I flashed it without any problem :~
Here is a screenshot of STARSTROBE1.0.c error:
Hey smart people I’m having an issue I can’t get rid of- first I thought it was limited to my E12 with a tiny10 running a baby FET but I’m now getting it on my TC300 with a BLF17DD v2 running with a zener mod and MT-G2…
When the light is off (I’ve changed the default to no memory without soldering the star) it will come on in moonlight PWM =1, true “moonlight mode” (also set in the programming to default on without soldering star, not just low set to 1)and at initial start up it works fine but when cycling up threw the modes when it rolls around back to moonlight there is an extremely bright flash after turbo. Like I said at first I was thinking it had to do with the baby FET I have on the tiny10 but now it’s doing it on a 17dd that started with completely different code, not just a rewrite.
Other variables to mention are 1 WDT tick before mode is memorized, on-time and fast PWM.
priest77 - dunno, haven't dlnd'd and tried that source code. Did this come from JC or RMM? Maybe they know? Wonder if the Dev Studio versions are the same - what you use and they used, or something like optimization settings for the build. If you used same source with nothing edited, then could be the tools you are using are generating compiled code that's not as efficient or optimized as they did.
I use Atmel Studio 6.0, or newer.
@priest77
afaik different compiler might produce different hex file sizes while compiling the same source code.
0x0410 means your hex file is larger than 1024 byte which is max for Attiny13a, as Tom E wrote.
Atmel Studio shows the size in the bottom window (scrolling up a bit) after compiling, so you can see if it is too large before flashing.
You might try reducing the code slightly by removing unneeded features, as you are only slightly above 1kB.
You are both right. I’ve installed latest version Atmel Studio 6.2 and now it tells me this:
Now I am not sure what code part can be removed.
I want to remove the feature of “Star 3 = H-L if connected”
I run Atmel Studio 6.2, just downloaded STARStrobe1.0.c, created a new solution and project (actually just copied and renamed an existing one), build output below. The key info is these two lines:
Program Memory Usage : 1012 bytes 98.8 % Full
Data Memory Usage : 50 bytes 78.1 % Full
It's big but just fits. I'd carefully check the compiler and linker arguments. It says below it's using vers 4.8.1. Also, you must use the "Optimize for size" setting of -Os.
------ Rebuild All started: Project: STARStrobe, Configuration: Release AVR ------
Build started.
Project "STARStrobe.cproj" (Clean target(s)):
Target "Clean" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Compiler.targets" from project "C:\Tiny13a Projects\STARStrobe\eswitch\STARStrobe.cproj" (entry point):
Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Extensions\Application\AvrGCC.dll".
Task "RunCompilerTask"
Shell Utils Path C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils
C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils\make.exe clean
rm -rf STARSTROBE.o
rm -rf STARSTROBE.d
rm -rf "STARStrobe.elf" "STARStrobe.a" "STARStrobe.hex" "STARStrobe.lss" "STARStrobe.eep" "STARStrobe.map" "STARStrobe.srec" "STARStrobe.usersignatures"
Done executing task "RunCompilerTask".
Done building target "Clean" in project "STARStrobe.cproj".
Done building project "STARStrobe.cproj".
Build succeeded.
------ Rebuild All started: Project: STARStrobe, Configuration: Release AVR ------
Build started.
Project "STARStrobe.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Compiler.targets" from project "C:\Tiny13a Projects\STARStrobe\eswitch\STARStrobe.cproj" (target "Build" depends on it):
Task "RunCompilerTask"
Shell Utils Path C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils
C:\Program Files (x86)\Atmel\Atmel Studio 6.2\shellUtils\make.exe all
Building file: .././STARSTROBE.c
Invoking: AVR/GNU C Compiler : 4.8.1
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-gcc.exe" -x c -funsigned-char -funsigned-bitfields -Os -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -mmcu=attiny13a -c -std=gnu99 -MD -MP -MF "STARSTROBE.d" -MT"STARSTROBE.d" -MT"STARSTROBE.o" -o "STARSTROBE.o" ".././STARSTROBE.c"
Finished building: .././STARSTROBE.c
Building target: STARStrobe.elf
Invoking: AVR/GNU Linker : 4.8.1
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-gcc.exe" -o STARStrobe.elf STARSTROBE.o -Wl,-Map="STARStrobe.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=attiny13a
Finished building target: STARStrobe.elf
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "STARStrobe.elf" "STARStrobe.hex"
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "STARStrobe.elf" "STARStrobe.eep" || exit 0
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "STARStrobe.elf" > "STARStrobe.lss"
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "STARStrobe.elf" "STARStrobe.srec"
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1051\avr8-gnu-toolchain\bin\avr-size.exe" "STARStrobe.elf"
text data bss dec hex filename
1012 0 50 1062 426 STARStrobe.elf
Done executing task "RunCompilerTask".
Using "RunOutputFileVerifyTask" task from assembly "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Extensions\Application\AvrGCC.dll".
Task "RunOutputFileVerifyTask"
Program Memory Usage : 1012 bytes 98.8 % Full
Data Memory Usage : 50 bytes 78.1 % Full
Done executing task "RunOutputFileVerifyTask".
Done building target "CoreBuild" in project "STARStrobe.cproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.2\Vs\Avr.common.targets" from project "C:\Tiny13a Projects\STARStrobe\eswitch\STARStrobe.cproj" (entry point):
Done building target "Build" in project "STARStrobe.cproj".
Done building project "STARStrobe.cproj".
Build succeeded.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
To correct the Optimization setting to "-Os" in Atmel Studio 6.2, do the following:
Sorry for not specifying, I do have my compiler optimization set to -Os
@Tom E
It worked now!
avrdude done. Thank you.