Close

Hardware

A project log for PP04 - Camel computer

Edit, assemble, program and debug your PIC18 application... on another PIC. Complete IDE on single chip. Undocumented PIC features exploited

jaromirsukubajaromir.sukuba 07/04/2014 at 09:560 Comments

Hardware

All hardware is built around MAX32 development platform, as extension to be stacked on original board, creating compact device.

Extension contains everything needed to turn MAX32 into PIC18 programmer - mainly Vpp generator (voltage to bring on MCLR line to enter programming mode of some PIC18 devices), voltage level converters for data lines, data storage, power supply, keyboard (made from discrete switches) and display (tiny and low-power 98x64 pixels), with strong accent on low power operation. In fact, there is nothing much to add, due to completeness of MAX32 board and usage of PIC32 peripherals.

PIC18 programming interface

This part of circuit is built around Q2 to Q5 and level converters 74LVC1T45.

Q2 is power switch for step-up converter, its base is feeded from PWM generator in PIC32. Depending on frequency and duty cycle, on capacitors C8 to C10 voltage rises above level on C7, C11 and C12. This voltage is brought into voltage divider R5 and R6, dividing high voltage to level suitable for AD converter in PIC32. This allows to implement PID regulator, keeping high voltage at needed level (13,5V for PIC18Fxxxx and 8,5V for PIC18FxxKxx).

Q3 is high-side switch, switching high voltage on its emitter to MCLR target pin (T_MCLR). Q4 is part of switch, enabling Q3 to be switched from 3,3V CMOS PIC32 level. When Q3 is off, Q5 allows T_MCLR to be pulled down.

PGC and PGD lines of target PIC (T_PGC and T_PGD) are controlled by two 74LVC1T45 drivers, what allows target to be powered by 1,8-5,5V source. R13 and R14 are pull-down resistors ensuring logic levels for correct operation.

Data storage

Data storage is possible in two ways - SPI FLASH memory and Micro SD card.

SPI FLASH memory is currently unpopulated, but there are more options at this position. You can populate SPI FLASH (25VF161 or similar), SPI EEPROM (25LC256 or similar) or SPI RAM (23K256) due to universal footprint.

Micro SD card (uSD) is connected in simpler SPI mode (as opposed to full-blown 4-wire interface), using SPI peripheral of PIC32.

Power supply

There is option on board to supply target and circuits of upper half of PP4 from separate voltage regulators. EN pins of regulators are brought to PIC32 pins, however this feature is not used now. All circuits are supplied by MAX32 board voltage regulator.

There is also space for MCP73831 charger, this one is unpopulated too.

User interface

This part of circuit consists of two main parts - display and keyboard.

Display is small 98x64 pixel LCD, with low power operation (circa 200uA), with IIC interface. This interface uses IIC peripheral in PIC32, allowing easy implementation of this part of user interface. Display is used in text mode (there is no font generator in this device, so it is emulated in PIC), with 8 lines by 16 characters.

Keyboard consists of 20 discrete buttons, because such as complete keyboard is almost unobtainable. Those buttons are not very pleasant to work with, but it is simple, cheap and available solution. Keyboard is arranged into three parts - cursors keys (up, down, left, right) arranged into group of four buttons, alphanumeric area (12 keys to write numbers or letters, the same principle as keyboard of mobile phone) and special keys (enter, escape, shift and backspace).

Except of local keyboard and display, there is option to communicate through serial communication channel, as an alternative terminal. There is kernel command to switch between terminals. Standard communication parameters are 9600 baud, no parity, no handshaking.

Discussions