main
Line | |
---|
1 | /* HEREPIC - AVR-based ICSP programmer for microchip PIC16F6xx and 16F8xx devices
|
---|
2 | * Copyright 2012, Adrien Destugues <pulkomandy@pulkomandy.tk>
|
---|
3 | *
|
---|
4 | * This file is distributed under the terms of the MIT licence.
|
---|
5 | */
|
---|
6 |
|
---|
7 | // ICSP commands are 6-bit wide, for most of them (but not all) the 2 MSb are
|
---|
8 | // ignored.
|
---|
9 | // We also use these as USB commands for now, but we may do otherwise, since
|
---|
10 | // transferring only 14 data bytes in an USB frame is quite a bit of waste.
|
---|
11 | // We need some custom commands on USB side as well, to reset the PIC, blink
|
---|
12 | // leds, and such things.
|
---|
13 | typedef enum
|
---|
14 | {
|
---|
15 | // HOST to DEVICE
|
---|
16 | LoadConfigWord = 0x0,
|
---|
17 | LoadCodeWord = 0x2,
|
---|
18 | LoadDataWord = 0x3,
|
---|
19 |
|
---|
20 | // Configuration
|
---|
21 | NextAddress = 0x6,
|
---|
22 | BeginEraseProgram = 0x08,
|
---|
23 | BeginProgramOnly = 0x18,
|
---|
24 | BulkEraseCode = 0x9,
|
---|
25 | BulkEraseData = 0xB,
|
---|
26 | BulkEraseConfig1 = 0x01,
|
---|
27 | BulkEraseConfig2 = 0x07,
|
---|
28 |
|
---|
29 | // DEVICE to HOST
|
---|
30 | ReadCodeWord = 0x4,
|
---|
31 | ReadDataWord = 0x5,
|
---|
32 | } ICSPCommands;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.