summaryrefslogtreecommitdiff
path: root/README
blob: 580ed04b83b6950cdd0e5b095241141b1243f046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
This is the README file to the DF10CH Atmolight Controller Project.

Written by: Andreas Auras (yak54@gmx.net)

See the file COPYING for license information.

This project is hosted at:
http://projects.vdr-developer.org/projects/show/atmolight-controller

More documentation (currently only in german language) about this project can be found at:
http://www.vdr-wiki.de/wiki/index.php/VDR_Wiki:DF10CH_Atmolight_Kontroller

This project uses Objective Development's firmware-only USB driver V-USB
for Atmel AVR microcontrollers. For more information please visit
http://www.obdev.at/vusb/

See the files usbdrv/License.txt, usbdrv/CommercialLicense.txt, usbdrv/USBID-License.txt
and usbdrv/Readme.txt for license information about using V-USB.


This directory contains the firmware, DF10CH setup program and KiCad files of hardware design:

README                The file you are currently reading
HISTORY               History of changes
Makfile               Makefile for generating everything
df10ch_setup_pkg/     Python modules needed by the DF10CH setup program
pwm_appl/             Application firmware for PWM-Prozessor
pwm_boot/             Bootloader firmware for PWM-Prozessor
usb_appl/             Application firmware for USB-Prozessor
usb_boot/             Bootloader firmware for USB-Prozessor
usbdrv/               Objective Development's firmware-only USB driver V-USB for Atmel AVR microcontrollers
test_appl/            Controller test application
kicad/                KiCad files of hardware design: circuit and board layout
df10ch_common.h       Common include file used by firmware
df10ch_usb_proto.h    Include file with definitions of implemented USB communication protocol
df10ch_setup.py       Main python script of DF10CH setup program
setup.py              Python script used for installation of Df10CH setup program
MANIFEST.in           File used by Python installation script



----------------------
Building the hardware:
----------------------

You will find design files of circuit and board layout for use in KiCad within the kicad/ subdirectory.
The files are generated with KiCad version 20090216-final.
File "10ch_pwm_ctrl-solder-side.ps" is a postscript plot of the board layout
File "10ch_pwm_ctrl-silks_cmp.ps" is a postscript plot of the component placement
File "10ch_pwm_ctrl.lst" is a list of the needed hardware components for the board

You can produce other plot formats (e.g. Gerber, HPGL) and drill files by using KiCads plot features.
You can download KiCad from here: http://kicad.sourceforge.net
 


----------------------
Building the firmware:
----------------------

For building the firmware for the two Atmel AVR microcontrollers you need AVR-GCC installed.
On debian based systems these are packages avr-gcc, binutils-avr, avr-libc, avrdude

Each firmware sub directory contains a Makefile for compiling and flashing of firmware:

Compiling firmware:

	make
	
Flashing firmware with avrdude:

	make prog 	--> programming of flash, fuse and lockbits
	make flash	--> only programming of flash
	
Options to avrdude can be specified with:

	make prog AVRDUDE="avrdude -c stk500v2 -P avrdoper"
	

Normally only the bootloaders are flash into the processors. For this you need a dedicated AVR programmer.
The application firmware could later be flash via the DF10CH setup program.
This has the advantage that updates of the application firmware could be easily done over the USB
interface without the need for a dedicated AVR programmer.
If you like you could directly flash the application firmware without the bootloaders. But you will
lose the firmware update feature of the DF10CH setup program.


------------------------------------
Installation of DF10Ch setup program
------------------------------------

For running the DF10CH setup program you need a installed python environment version 2.6,
the python modules TKinter, Image, ImageTk, ImageDraw and PyUSB and a installed libusb library.
On debian based systems these are packages: python2.6, python-tk, python-imaging, python-imaging-tk,
python-usb, libusb-1.0-0

You can start the program directly from the distribution directory with:

	python df10ch_setup.py
	
You can also install the program to the default python installation location with:

	python setup.py install

Now df10ch_setup.py should be simply in your standard PATH for execution. Start it with:

	df10ch_setup.py


The setup program understands the following command line option:

	-d N		Set debug level to N
	-s N		Set number of simulated controllers. With this option you can play with
	     		the program without having hardware.


-----------------------------------------------------
Compiling and running the controller test application
-----------------------------------------------------

In sub directory test_appl there is a controller test application that could be executed
at your host computer. It sends brightness values from min to max and max to min in one
test loop to each connected controller in parallel with the maximum possible speed.
To get maximum load at controller you should have a setup so that each controller's channel
drives a different area. This is the initial setup of a controller if you do not have
already changed the channel mapping with the setup program.

For compiling the application you need a installed libusb library.
On debian based systems this is packages: libusb-1.0-0.

cd test_appl
make

Running the application:

./df10ch-test <number-of-test-loops> 
e.g. ./df10ch-test 50