C
readme.ino
Go to the documentation of this file.
1
/****************************************************
2
* APC220 config
3
* A small arduino by Jens Dalsgaard Nielsen, AAU
4
* Studentspace @ Aalborg University
5
* http://es.aau.dk/staff/jdn
6
*
7
* Find this code at github.com/jdn-aau/div
8
*
9
* This program is for setting frequency and baudrate on the
10
* apc220 radio using an arduino.
11
*
12
* I is not able to setup the advanced features like network ID etc
13
* In that case you need the apc220 config program (windows)
14
* On the other hand I have never used these networking features.
15
* If you want independent network I normally implement this by using
16
* different frequencies.
17
*
18
* DIFFERENT VERSIONS
19
* There are several versions of the apc220 radio which cover slightly
20
* different frequency bands.
21
* apc220-43 418-455 MHz
22
* apc220 v4.c 431-475 MHz
23
* It is difficult to obtain the correct information
24
* One "rule" green PCB 475 MHz area
25
* yellw/orange 433 MHz area
26
*
27
*
28
* HOW TO USE IT ...........................
29
*
30
* Upload this program to your Arduino UNO
31
* (not to be used with DUE and other non AVR architectures)
32
*
33
* METHOD 1) Attach radio to dig pin 8-13:
34
*
35
>ARDUINO UNO<
36
---------------
37
| A aref >APC220 radio<
38
| R GND-++-GND-------------
39
| D 13 ++ 5V |=antenna =======>
40
IOREF U 12 -- ENABLE(high) |
41
RESET I 11 ++ RX |
42
3.3V N 10 ++ TX |
43
5V O 09 -- not used |
44
GND 08-++ CONFIG(low)----|
45
GND P |
46
| B ~ 06
47
A0 ~ 05
48
A1 04
49
A2 ~ 03
50
A3 02
51
A4 TX 01
52
A5 RX 00
53
---------------
54
*
55
* Program will search for the radio and if find you will get a menu
56
* for programming and reading radio
57
*
58
* R read settings
59
* W write new settings
60
* w FFFFFF R P B C - number of letters indicates precise number of digits
61
* FFFFFF: frequency: 434000 (434 MHz default ) range approx 418000-4/5000
62
* R: Rf data rate - 1/2/3/4 equals 2400(1km)/4800/9600/19200bps
63
* P: Radio output power - 0 .. 9 9 equals 13dBm(20mW)
64
* B: UART baudrate - 0/1/2/3/4/5/6 equals 1200/2400/4800/9600/19200/38400/57600bps
65
* C: Byte Chek Parity - 0/1/2 equals NoCheck(8N1)/EvenParity(8E1)/OddParity(8O1)
66
*
67
* Write example: w 434000 3 9 3 0 is...
68
* 434,000 MHz 9600 baud in air, 20mW, 9600baud on UART, No Parity(8N1)
69
*
70
*"p xx" FAST MODE
71
* Instead of writing allt he stuff just issue p xx - xx is an integer between 0 and ...
72
* Radio will be programmed with settings in source. The xx will adjust the radio frequency with
73
* f = startF + xx * stepF
74
*
75
* METHOD 2) Radio on AAU cansatshield or radio just connected to hw tx,rx
76
*
77
* Remember jumpers to the radio tx/rx (and setpin on shield v4)
78
* NB if you are going to upload a new program remove the jumpers temporarily
79
* To enable programming the setup pin on the radio must be set LOW
80
* The program is pin 8 in the program but it can be changed by changing SETPIN
81
* AAU shield v 4 can jumper the setpin to dig pin 8. If you have an older shield
82
* or just the radio connected to the hw tx/rx you must use a piece of wire
83
* NB the hw serial port can of course be changed (looking the source)
84
*
85
* The program will search for the radio and if present and setpin is reachable the
86
* radio will be programmed with the parameters found in the top of the main
87
*
88
* SO IF YOU HAVE TO PROGRAM MORE SHIELDS WITH DIFFERENT FREQUENCIES THEN
89
* 1. change parms in program source
90
* 2. recompile upload the new program
91
* 3. restart arduino
92
* 4. await action :-)
93
*
94
*/
95
96
/* CAPACITY CAPACITY
97
* The apc220 has 256 byte buffer onboard for TX and RX
98
* But
99
* 1. dont fill buffer (is you have higher uart baudrate than air baudrat)
100
* 2. average flow must be below half of air bandwidth because the apc radio add
101
* redundance to the info stream so errors can be corrected.
102
* To be safe be below 50% of nominal air bandwidth - and lower is you will be sure!!!
103
*
104
*/
105
Generated by
1.8.13