# HG changeset patch # User Paul Boddie # Date 1541792553 -3600 # Node ID f40a40d7101fd8e186115b9557aca8553e5e2562 # Parent 2686a14efbde9bd02bc0c80a1df1422e7ca221d7 Extended the documentation, adding build, circuit and programming details. diff -r 2686a14efbde -r f40a40d7101f README.txt --- a/README.txt Fri Nov 09 01:08:41 2018 +0100 +++ b/README.txt Fri Nov 09 20:42:33 2018 +0100 @@ -1,5 +1,5 @@ Introduction ------------- +============ The CommonPIC32 distribution contains library code and examples demonstrating various features and applications of MIPS-based products in the PIC32 @@ -15,8 +15,26 @@ vga-pmp documentation describing its approach, benefits and limitations, vga-timer but a summary is provided below. +To build each example, run a command of the following form in the top-level +directory of this distribution: + +make -C examples/demo + +Here, the demo example is built. + +Although it should be possible to build different examples without cleaning +previous build artefacts, it can be useful to run a command of the following +form to start again with no build products: + +make -C examples/demo clean + +Deploying the software requires a suitable method of programming a PIC32 +microcontroller. This is described below in the ICSP programming section. + + + Contact, Copyright and Licence Information ------------------------------------------- +========================================== The author can be contacted at the following e-mail address: @@ -25,8 +43,66 @@ Copyright and licence information can be found in the docs directory - see docs/COPYING.txt and docs/gpl-3.0.txt for more information. + + +Breadboard Circuit +================== + +In order to be programmed and to function normally, the device needs to be +deployed in a circuit configured as follows: + +PIC32MX270F256B-50I/SP +---------------------- +MCLR# 3.3V (via 10K pull-up resistor) +VSS GND +VDD 3.3V +VSS GND +VCAP GND (via 10µF capacitor) +VUSB3V3 3.3V +AVSS GND +AVDD 3.3V + +"Figure 2-1: Recommended Minimum Connection" from the "PIC32MX1XX/2XX +28/36/44-pin Family Data Sheet" stipulates additional 0.1µF ceramic capacitors +between VDD and VSS and between AVDD and AVSS. + + + +ICSP Programming Circuit +======================== + +To avoid limitations with JTAG programming and being unable to enable +JTAG-associated pins for other uses, the ICSP mechanism needs to be employed +instead. The circuit should resemble the following: + +PIC32MX270F256B-50I/SP Arduino +---------------------- ------- +MCLR# A0 +PGEC1/PGEC2 A2 (pulled up via 2K2 resistor to 3.3V) +PGED1/PGED2 A1 (via 220ohm resistor, then pulled up via 2K2 + resistor to 3.3V) + +The pull-up from MCLR# to VDD can apparently be left in place. + +The Pickle and Nanu Nanu software are used for programming: + +https://wiki.kewl.org/dokuwiki/projects:pickle +https://wiki.kewl.org/dokuwiki/projects:nanu-nanu + +Nanu Nanu can be deployed in the 5V-16M configuration on an Arduino +Duemilanove with an "open drain" or "sink" circuit as described above. Then, +the pload program provided by Pickle can be used to write the appropriate .hex +file as in the following example (probably as a privileged user): + +./pload program /dev/ttyUSB0 examples/demo/demo.hex + +Note that the Pickle configuration file (~/.pickle or ~/.pickle/config) will +need to have the port and baudrate settings defined. + + + VGA Output Example Comparison ------------------------------ +============================= In investigating different techniques, the following observations have been made about the behaviour of the different VGA examples: @@ -55,3 +131,12 @@ stability under load, and provide operational horizontal scrolling. These approaches provide a tradeoff between performance (vga-timer being faster) and resolution (vga-cpu being better). + + + +References +========== + +Basic PIC32 breadboard circuit: + +http://umassamherstm5.org/tech-tutorials/pic32-tutorials/pic32mx220-tutorials/pic32mx220-breadboard