Skip to content

Commit

Permalink
Fix calibration
Browse files Browse the repository at this point in the history
Removed internal calibration since the code was too expensive in flash
size, calibration is now possible only from an external script.

Fixed the code for the PWM output to be without internal constants so
that the external calibration doesn't need to know anything special
about the internal calculations beyond the y=ax+b assumption.

Added a calibrate.py script to calibrate the vout, both ADC and PWM.
  • Loading branch information
baruch committed Mar 18, 2015
1 parent e725ca3 commit cbf29e5
Show file tree
Hide file tree
Showing 8 changed files with 333 additions and 214 deletions.
5 changes: 1 addition & 4 deletions stm8/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SRC=main.c display.c uart.c eeprom.c outputs.c config.c calibrate.c fixedpoint.c parse.c adc.c
SRC=main.c display.c uart.c eeprom.c outputs.c config.c fixedpoint.c parse.c adc.c
CFLAGS= -lstm8 -mstm8 --opt-code-size --std-c99
OBJ=$(SRC:.c=.rel)
DEP=$(SRC:%.c=.%.c.d)
Expand Down Expand Up @@ -33,9 +33,6 @@ test_adc_accuracy: test_adc_accuracy.c config.c adc.c fixedpoint.c
test_parse: test_parse.c parse.c
gcc -g -Wall -o $@ $< -DTEST=1

test_calibration: test_calibration.c calibrate.c
gcc -g -Wall -o $@ $< -DTEST=1

clean:
-rm -f *.rel *.ihx *.lk *.map *.rst *.lst *.asm *.sym .*.d

Expand Down
93 changes: 0 additions & 93 deletions stm8/calibrate.c

This file was deleted.

25 changes: 0 additions & 25 deletions stm8/calibrate.h

This file was deleted.

Loading

0 comments on commit cbf29e5

Please sign in to comment.