zaterdag 11 juli 2009

PIC programmer working?


I hope this is the last post about the programmer. It seems to work now.

The SERPIC has a connection between the programming voltage and the read data.
I suppose this was meant to test the presence of the programmer. However no other PIC programmers seem to support this. So I removed it.
After this modification I was able to program the PIC using Winpic. However the program did not execute. I don't think the modification was needed after all.

Reading back data from the PIC revealed that the first 4 words were missing. I also found out that those words were written correctly when the default configuration settings were used. That means watchdog on and RC oscillator. My hardware uses an xtal so that won't be usefull. Changing these setting by hand did not work. Winpic seems to use the first 4 words for the configuration. i will look in the PIC datasheet to find out if my assumptions are correct.

My program does not set the configuration bits Spp took care of that. So I did not set those bits. I don't even know how to do that using my old compiler.
The Hitec compiler can set those bits though. I made a program that turns on/off a led. The first instruction is to set the configuration bits. Finally I was able to program the PIC and execute my program.
The only disadvantage is that sometimes Winpic can not control the serial port.
Starting Winpic800 once solves this.

Winpic800 does not work. It can set the serial port pins but it just won't read data from the PIC. I might look into that problem once.

Now I will start making the microcontroller board.

Geen opmerkingen:

Een reactie posten