The mini decoder for analog motor is built for:
- short/long adresses
- 14/28/126 speed step
- speed curve controlled with Vmin,Vmax and Vmid
- one burnd in speed curve
- increase, decrease controlled
- F1-F8 to GP2 (LED), can be switched to flickering firebox
- flickering firebox open/close automatically
- brake light
- rear lamps (changing with drive direction)
- GP4/GP5 switchable over F1-F8 (front lamps)
- "rangier" light switchable over F1-F8 (front light on both sides on)
- 2. Vmax switchable over F1-F8 or over drive direction
Programmable and readable with DIR, PAG, REG, BIT mode and programming on the main.
Tested with
Franken DCC-Zentrale from Oliver Spannekrebs with
RKDCC from Rainer Keil and with
TMWDCC software
also testet with the
TMWDCC project from Lars Lundgren and
Intellibox from Uhlenbrock.
List of known problems
The
PIC12CE519 has no interrupts and only a 2 step deep stack, therefore I must program in polling mode to decode the DCC signal.
One loop needs 25µs. The PWM has 256 speed steps and is 12800µs/78Hz long.
It varies because I am using the 1 bit of the DCC signal to calibrate the PIC.
The burned in speed curve for 28 speed steps can build with this
EXCEL work sheet and tested with a EPROM-PIC.
On this worksheet you can find the analog spreadsheet and the lin spreadsheet.
With the analog spreadsheet you can define your own speed curve by click and move in the graphic and then copy the yellow marked cells colum H-K via clipboard and paste in case of the SPDTAB subroutine in the *.asm file.
The lin worksheet is for people who are familiar with EXCEL and is for experience modifying curve by calculating (I don't describe this worksheet - test it)
The
PIC12CE519 has a 16 byte build in EEPROM, so the
configuration variables can be changed.
Based on
PIC12C509 I have built a switching decoder for pointing devices. For me the code for the PIC-processors was simple and easy to learn.
Then I build a decoder for stepper motor and also for analog motor.
I am using
MPLAB
as programming environment.
I want to build 4 versions as mini decoder:
- Faulhaber (PWM > 16kHz, 28FS)
- Analog motor (Vmin, Vmax, Vmid and other CV's)
- Stepping motor
- Function decoder with 5 output
This programs are in build construction, if you want more information please
mail.
Source of supply:
Electronic parts or complete sets of decoder you can order from Andreas Bergmann or Joachim Katzer (Web).