December 26, 2003

good things to COME !!!!

HI and hello world
join in the greatest fun of all
soon to come in this spot

programming the PIC microcontrollers
NOT - NOT - with the programmers provided
by the pros - but doing it yourself
depending on your knowledge of
electronics and programming
you can do it all yourself

program a complete COMPUTER
on a chip that costs approximately
$3 $3 yes $3
not $230 like sbc's of the past -
microprocessors on pcb's

dec 28,2003 I have not forgot to update
this entry. I am excited in my PIC programming
experiments and will be getting back to them shortly.
Stay tuned.

Jan 5, 2004
this is the very latest
I have succeeded in entering my 16 instruction
program onto the program memory (EEPROM)
of the PIC16F628.

I have verified that I have sent my program successfully
to the PIC16F628. This has been accomplished with a BASIC program
called PICRDALL.BAS. This program displays in hexadecimal
notation the data that it finds on the PIC. It utilizes the
READ command for use in programming the chip.

The program that I used to program the chip
is somewhat roundabout due to problems I
had with my sizeable BASIC programs.

I wanted to enter programming mode, which would bring
me to loc 0. Then I would write my first instruction
and then increment the program counter. However this never
worked in 2 programs. So, for the time being I loop thru a process
that goes into programming mode, increments the
program counter to the desired loc, and then writes
the instruction. It does this over and over, going in and out of
programming mode so it can go to loc 0.

Inefficient, but it works. Later I will get a more efficient BASIC
program.

DID THE LOADED PROGRAM WORK?

No. The first run did not show signs of working.
It was a program to make an led blink on & off.

Here is the hex and the assembler of the pgm:

0000
1683
30f0
0086
1283
1486
200a
1086
200a
2805
0fa0
280d
0008
0fa1
0000
280d
280a

and here is the assembler
statements

nop
bsf status, rp0
movlw f0h
movwf trisb
bcf status,rp0
loop1 bsf portb,rb1
call delay
bcf portb,rb1
call delay
goto loop1
delay incfsz accum1
goto step2
return
step2 incfsz accum2
nop
goto step2
goto delay

accum1 & accum2 are registers
20h & 21h.

I have some other hello world pgms
and I will let you know when I get this and
the others running

Larry Keegan Jan 5, 2004

Posted by larrykeegan at December 26, 2003 08:16 PM