April 18, 2004

LATEST ON THE PIC - a letter to BOB

Here is the latest on what I am doing with the PIC
and my problem in making PROGRAMMING SOFTWARE
to load programs on to the PIC.

Hi Bob
I think I'll reply to your note and then plunk this message
right out on my BLOG. Basically, I got one PIC to drive a stepping motor
also successfully implemented INTERRUPTS and also got TIMER0 working
which also involves interrupts. At the point where I was going to do
a robot that would move around in the pattern of a square, I decided to go back to investigating my programming software again.

By the way, my communication between the 2 PICS was just input/output -
didn't even use an interrupt. I think I told you of the organ pipes
I picked up in Reading, but I just hooked up a blower I had to an organ pipe but the initial results were not to great. You seem to be dong your experiments much more scientifically, and you have garnered much more knowledge about them than I have.

Let me get back to my programming software for loading in my programs to the PIC. I explained how I am almost embarrassed to admit that all my programs have been loaded onto the PICs by software which is a WORKAROUND for a problem I have encountered. To program the PIC there are a handful of commands which are interspersed with the data you are sending to the PIC.
My QBASIC software sends 2 streams, clock & data, to the PIC.

My problem is that each time I write one line of data (an instruction) to the PIC, it either drops out of programming mode or something and does not carry out the remainder of the commands. My workaround has been to write one line of data to the PIC, then leave programming mode, then re-enter programming mode which always brings you to location zero. At this point,
I send the command to increment the program counter as many times as necessary to reach the new location where another line of data will be written.

I have talked with some people at MicroChip where I uncovered some errors in
the programming specs which I has found out on the Internet. Since there is no limit on how slow you can send the clock & data stream, I set up a very simple circuit and thru 2 set-reset flip-flops I fed in the data manually.
And to my surprise the same thing happened - only one line of data was accepted. I've tried many different PIC16F628 chips. I'm almost of a mind to jump to the PIC16F628A, which has some slight changes.

Well there it is, I'm sure much more than you wanted to hear.

Larry Keegan in Stoneham, MA

On 4/18/04 10:56 AM, "Robert Sweeney" wrote:

> Hi Larry,
>
> How are things going? I haven't heard from you in a while and I noticed
> on your blog that you are in a "tactical retreat" since March 21. I
> hope you are feeling better.
>
> It looks like you are making rapid progress with your pics. Did you set
> up communications between two pics with RS-232 (USART port) yet?
>
> My son and I are also taking a break from our projects. Although, I am
> writing a program to calculate the parameters for pipe organ pipes on
> the PC. I am writing a windows program in visual c++. I can select the
> pipes I want in my pipe organ and it will spit out all the dimensions
> for the wood pipes as well as the air consumption needed so I can design
> the appropriate wind system.
>
> Other than that I have been a slug. Enjoy the nice weather!
>
> Regards,
> Bob Sweeney
>
>

Posted by larrykeegan at April 18, 2004 04:51 PM