January 22, 2004

MY ASSEMBLER PROGRAM

I have written a program which assembles
programs written in assembler code.
It is written in QBASIC and is called PICASM.BAS.
It produces a hex (hexadecimal notation) file
which can then be read by my PROGRAMMER
program PICLP542.bas, which loads the program serially
into the PIC.

The first version of the assembler has
certain limitations. All operands in the
assembler instructions must be a DECIMAL
number. A later version of the assembler will
accept labels, and the familiar "EQU" statements.
Labels such as "STRT1" & "LOOP1" occurring in the
ffirst pos of the instr line will be picked up automatically
by a later version of the assembler.

Posted by larrykeegan at 01:35 PM

MY PIC PROGRAM WORKS

My first program for the PIC is a program
that blinks an led through pin RB1 (pin #7)
of the chip.

By the way, here is a pic of our chip.
16f628.jpg

At first I was a bit disconcerted since
the blinking was erattic and sometimes stopped
when I picked up the breadboard. After investigation'
I conditioned a few of the pins. I put a 10k resistor on
pin 10 and applied Vdd to pin 4 (MCLR), using a diode to lower
the voltage a bit. I also found that by changing the value of
resistance to grd on pin 16 (osc1) I could change the clock
frequency of the chip computer. This would allow my delay loops to be even longer.

Posted by larrykeegan at 01:09 PM

January 12, 2004

More on the PIC16F628

I have read out the data which
sits in the configuration word area of the chip (PIC16F628)

the chip ID for 2 diff speed chips was
hex 07C0

the config word for both was 3FFF
the first ID field for the 20 MHZ chip was
hex 1800

the config word area begins at
loc hex 2000

Posted by larrykeegan at 02:34 PM

This is the hardware for programming the PIC


prgrmr3.jpg

There is a PC laptop using the parallel port to talk
to a TTL buffer and thru it the PIC to be programmed

Posted by larrykeegan at 02:17 PM