-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
81 lines (72 loc) · 3.39 KB
/
readme.txt
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
```
HARDWARE
This peripheral provides the interface to an ATmega88PB AVR.
An AVR peripheral is typically used to perform immediate, OS
independent initialization activity. The complete datasheet for
the ATMEGA88PB device can be found at:
http://ww1.microchip.com/downloads/en/DeviceDoc/40001909A.pdf
RESOURCES
There are 2 separate categories of resources for this peripheral,
programming related and real time data memory access. The programming
related resources allow flashing of the program and EEPROM memories.
The programming jumper must be installed to use the programming
related resources.
The data memory access resources allow you to read and write both
RAM and CPU registers while the program is running. Your host
application would normally control the AVR application using these
resources.
program:
Use this resource to load a program into the AVR or to read the
program that is currently loaded. Be sure the programming jumper is
in place and note that the file path must be fully qualified.
Example:
pcset avr program /home/me/myavr/led.hex
pcget avr program /home/me/myavr/ledcheck.hex
eeprom:
Use this resource to read and write the AVR's EEPROM. To flash
the EEPROM, specify the beginning address in the EEPROM followed by
the space separate hex values to be flashed. To dump the EEPROM,
specify the beginning address in the EEPROM followed by the number
of bytes to dump. EEPROM addresses range from 0x00 to 0x1ff. Be
sure the programming jumper is installed. At most twelve bytes
can be written at one time. The forms of the commands are:
pcset avr eeprom <address> <byte1> <byte2> ...
pcget avr eeprom <address> <count>
Example:
pcset avr eeprom 01f2 45 67 89 ab # write 4 bytes of EEPROM
pcget avr eeprom 01f2 4 # read 4 bytes of EEPROM
pcset avr eeprom 0000 77 # set default LED blink rate
vram:
Use this resource to read and write RAM in the AVR. Mapping
the virtual RAM addresses to physical addresses is done in the SPI
receive character interrupt handler. The sample LED application
maps vram addresses into the 'hostRegs' array of bytes. Commands
are of the form:
pcset avr vram <address> <byte1> <byte2> ...
pcget avr vram <address> <count>
Example:
pcset avr vram 00 77 # set working LED blink rate
pcget avr vram 01 01 # enable the LED flasher
fifo:
Use this resource to write many values to a single RAM location,
i.e. host register, in the AVR. Note that currently there is way
to read many values from a single host register. Also, any one
transaction is limited to 12 bytes of data written to the host
register. The sample fifo application shows the usage of this
resource. Commands are of the form:
pcset avr fifo <address> <byte1> <byte2> ...
Example:
pcset avr fifo 0 5 6 7 8 9a bc de # write 7 values to a fifo
# through host register 0
reg:
Use this resource to directly read and write the AVR hardware
registers. Register addresses must be in the range 0x23-0xc6.
Please see the register summary in the data sheet for a list of
the hardware registers. Addresses and data are given in hex and
commands are of the form:
pcset avr reg <address> <byte1> <byte2> ...
pcget avr reg <address> <count>
Example:
pcset avr reg 2b 80 # turn on the LED directly
pcget avr reg 2a 2 # returns LED port DDR and PORT values
```