Historical project documentation. Content is maintained in GitLab.

RCSourceIntro

RC Source Intro

{i} This is work in progress! Please post in the forum when you find errors or mistakes! This is Benjamin’s attempt at giving an overview of the RC-Controller source code. The target MCU is an ATmega644p with 64k FLASH and 4k RAM.

Source Files

The RC Source contains the receiver controller boards firmware source code. Its located in the folder rc-controller.

Source FileDescriptionState
analog.c/hA/D Converter driver
conf.c/hHandling of global configuration
console.c/hHandling of serial consoles
devices.c/hHandling of the device table
i2c.c/hImplements I2C slave
led.c/hDuo-LED driver
main.c/hStarts the show...
rc-dsl.c/hHandling of ACT DSL receivers
rc-sum.c/hSampling and decoding of PPM sum-signal
servo.c/hRC Servo driver
syscall.c/hC Library retarget layer
systimer.c/hImplements 1ms system heartbeat
task.c/hTask management
uart.c/hUART driver

analog.c/h: Continuously (ADC-IRQ) converts ADC channels ADC0-ADC3 and stores values in global data structure.

conf.c/h: Handling of global configuration, like NGOS, at least load/store conf not implemented.

console.c/h: Handling of serial consoles and commands on UART0/1, like NGOS, DSL receiver detection, RC Controller specific commands (Servo controls, …) not fully implemented.

devices.c/h: Handling of the device table, like NGOS, device table adapted to RC Controller.

i2c.c/h: Implements I2C slave state machine (I2C-IRQ), emulates a R/W memory, EEPROM like.

led.c/h: Simple functions for setting the duo-LEDs connected to the RC-Controller.

rc-dsl.c/h: Handling of ACT DSL receivers, like NGOS, data parsing, control tasks, debug commands.

rc-sum.c/h: Sampling and decoding of PPM sum-signal, like NGOS, adaption to AVR hardware finished?

servo.c/h: RC Servo driver, state unknown?

syscall.c/h: C-Library Retarget layer for STDIO, putchar(), read() functions to work on UART0/1

systimer.c/h: Implements 1ms timer ticks with Timer0 IRQ, runs RC tasks every 200ms

task.c/h: Task management implementation from NGOS

uart.c/h: UART driver, license unknown, tailored to our needs, todos?

Configure settings

These are the most important configuration settings:

  all

  clean

  rc-flash-fuses-dragon
  rc-flash-dragon
  rc-flash-dragon-no-verify
  rc-read-flash-dragon
  rc-erase-dragon

  rc-flash-fuses-usbprog
  rc-flash-usbprog
  rc-read-flash-usbprog
  rc-erase-usbprog

  rc-flash-fuses-stk500
  rc-flash-stk500
  rc-read-flash-stk500
  rc-erase-stk500

  indent