ahpic
sections in this file
---------------------
ASSEMBLING
PROGRAMMING
:.!sed -n -e 's|^##* *([^#]*) ##*|1|p' %
###########################################################################
################################# ASSEMBLING ##############################
###########################################################################
use gpasm
gpasm -g -a inhx32 -o <outputfile>.hex <inputfile>.asm
###########################################################################
################################# PROGRAMMING #############################
###########################################################################
2 options for getting pk2cmd:
1) Use my copy from git
cd ~/Software
git clone ssh://acorn@shell2.rawbw.com/home/users/acorn/git/pk2cmdv1.20LinuxMacSource.git
cd pk2cmdv1.20LinuxMacSource
make
sudo make install
2) download from web
Download pk2cmd. I got it from microchip website. Google for pk2cmd.
untar into ~/Software
cd ~/Software
tar xzf ~/Archive/ee/parts/pic/pk2cmdv1.20LinuxMacSource.tar.gz
cd pk2cmdv1.20LinuxMacSource
sudo apt-get install libusb-dev
edit cmd_app.cpp and replace search for PK2DeviceFile in PATH with hardcoded:
_tcscat_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat");
make linux
sudo make install
installs into /usr/local/bin/pk2cmd
For example see: ~/Projects/picnecklace/Makefile
use pk2cmd
pk2cmd -?
check what part is atached:
pk2cmd -P
erase and program chip:
pk2cmd -P<partname> -F<hexfile>.hex -M
run:
pk2cmd -P<partname> -T -R
stop:
pk2cmd -P<partname>