Home Price List Order Info Microcontrollers Assembler C and C++

Customers' Problems

PIC Training & Development System:-

Problem Solution
Hi Peter,

I bought your PIC training course a few months back and am very pleased with it. My question concerns the serial port used for programming, at the moment I am using my old laptop, my new laptop has only USB, would it be possible to use a USB to serial adaptor.

Many thanks,
B (UK)


Dear B,

I am sending you the latest version of BSPA which allows the programmer module to be used with a USB to COM port adapter. You must arrange the hardware so the COM port used by BSPA is COM3 or COM4.

If there is something you do not understand please telephone.

Best wishes,
Peter Brunning

Hello Peter,

I programmed 16F84 to run stepper motor using its portb as output and porta as input for on-off and for reversing direction of motor. It is working OK. When I used 16F877A to run the same motor and same driver, it does not work.

Please get out me of this problem.

Mr A A (Pakistan)


Dear A,

A programme written for a 16F84 will not run in a 16F877A unless special code has been included for the PIC16F877A. The RAM of the 877A starts at 20h not 1Ch and port A for the 877A is set as analogue inputs at switch on, whereas the 84 starts with port A as normal digital i/o. The changes needed (in assembler and C) to run 84 code in the 877 (and 627 and 88) are detailed in chapter 2 of Experimenting with PIC C.

Best wishes,
Peter Brunning

Dear Mr. Brunning,

I started learning how to program microcontrollers about two years ago and I purchased the PIC Training & Development System from your company. I have used it sucessfully and I find the books accompaning the system very well explained and easy to use. However, recently I have been trying to program a PIC16F84A with hex files without sucess. When I attempt to compile the hex file, I get the following error - "CKECK DIGIT INCORRECT". I have attached the .hex file.

I appreciate any help you can give me.

Regards,
Mr N. D. (Republic of Ireland)

Dear N,

I have tested at the HEX text file and I find that the second to last line of the HEX data is not correct........

:0405E0008510F12A4C

I do not know where the error is but if the data in the line is correct the check digit at the end of the line should be 67.......

:0405E0008510F12A67

Please go back to where you obtained the HEX file and ask for a corrected HEX file.

Best wishes,
Peter Brunning.


I am having a minor problem with the "read" facility. When I read code from a programmed PIC, I can read the whole memory O.K. However I would like to read the first 100 or so memory locations. From the book I learn that you type in,say, PICSIZE 100. My problem is that I do not know exactly where and when to type it!! Could you help please.

Mr D. V. Glasgow.

P.S. I am enjoying the course. All programmes so far have worked perfectly.


PICSIZE 100 should be typed at the top of the programme text just as you have done but it will not become effective until you assemble the text into PIC code. However, you do not need to use PICSIZE 100 - you can press the ESC key at any time to end the read process.

Best wishes,
Peter Brunning.

I have written a programme which will not run in the PIC. I used the simulator to single step and get a Stack Overflow error. Can you help me?

There are two possible problems. The PIC is a complete computer in one chip but compared to a PC it has a tiny amount of memory. The stack is only 8 deep so subroutine calls must never go deeper than 8. That is not usually a problem with normal programmes. The most likely problem is that you are calling a subroutine and jumping back rather than using the return instruction. To find the problem use the simulator to single step carefully until you locate the point where the problem occurs.

I have just purchased six PIC16F627 microcontrollers from Maplin. Five of them seem to be faulty. They appear to programme correctly but the programme does not run when I put the PIC in its circuit.

PICs are incredibly tough microcontrollers. We have never yet broken one. You must start by assuming that the PICs are not faulty and ask yourself what you are doing wrongly. It is most likely that you are forgetting that all new PICs need to be configured. You are certain to find that the PIC that does work has already been configured which can happen if Maplin test a few PICs from a batch.

I have programmed a PIC16F627 wired into the plug board. Every thing went OK until I tried to use it. It did not work.

This can happen if another PIC is plugged into one of the ZIF sockets at the same time. What happens is both PICs are programmed correctly but when you read the configuration the values displayed will be all the zeros from both PICs so you may think your PIC is properly configured when it is not. The solution is obvious you must always ensure that only one PIC is being programmed.

Is it possible to programme a PIC using the Brunning Software programmer module with a hex file that has been written and compiled by another software package.

Yes, this is a common requirement. Simply load the hex file into our text editor just as if it is an ordinary text file. Assemble it as if it is an ordinary text file and write it to the PIC in the usual way.