What could be causing my PIC programming trouble?

  • Thread starter Thread starter mario_
  • Start date Start date
  • Tags Tags
    Programming
Click For Summary
Programming issues with the PIC16F628A micro-controller may stem from incorrect file format settings, such as not specifying binary or Intel Hex during programming. Users should ensure all programming options, including ORG and default values, are correctly configured. Despite successfully building the project in MPLAB and using the PICkit2 programmer, the programmed HEX file does not match the expected output, indicating a potential programming error. Additionally, there is a discussion about controlling a throttle with an actuator, weighing the use of a servo versus a stepper motor based on frequency input from the PIC. Proper setup and configuration are crucial for successful programming and functionality.
mario_
Messages
1
Reaction score
0
Hi there! I've got a small, but rather tedious problem with programming a PIC16F628A micro-controller using a USB programmer.

The assembly code is simple:

list p=16f628a
#include <p16f628a.inc>

ORG 0x000
goto main

main
clrf PORTA
movlw 07h ;Turn off comparators
movwf CMCON

bsf STATUS,RP0
clrf TRISA
movlw 00h
movwf VRCON
bcf STATUS,RP0

loop
movlw 01h
movwf PORTA
goto loop

END




This is just a test program to set one of the bits on PORTA high. Using MPLAB and the PICkit2 programmer, I'm able to build the project and program it, however when I check the value on the pin, it is always low. When I extracted the HEX file from the the PIC, it wasn't even close to the HEX file that was supposedly programmed onto the PIC!

Help Please!
 
Engineering news on Phys.org
Be sure that the file format for the programming is selected correctly. One common source of incorrectly programmed parts is to not specify whether the source file is binary or Intel Hex. Also be sure that the rest of the programming options and switches are set to correct/reasonable values (like org's, default values, etc.)
 
I see you people know wat you are talking about i want to controle a throttle with an actuator but can't make up my mind if i must use a servo or a stepper the output of the actuator will be dependent on a frequency input on the pic can u maybe help i am progaming in flowcode (i am new in this kind of thing)
 
What mathematics software should engineering students use? Is it correct that much of the engineering industry relies on MATLAB, making it the tool many graduates will encounter in professional settings? How does SageMath compare? It is a free package that supports both numerical and symbolic computation and can be installed on various platforms. Could it become more widely used because it is freely available? I am an academic who has taught engineering mathematics, and taught the...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
2
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K