What could be causing my PIC programming trouble?

  • Thread starter Thread starter mario_
  • Start date Start date
  • Tags Tags
    Programming
AI Thread 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)
 
Thread 'I need a concave mirror with a focal length length of 150 feet'
I need to cut down a 3 year old dead tree from top down so tree causes no damage with small pieces falling. I need a mirror with a focal length of 150 ft. 12" diameter to 36" diameter will work good but I can't think of any easy way to build it. Nothing like this for sale on Ebay. I have a 30" Fresnel lens that I use to burn stumps it works great. Tree service wants $2000.
Hi all, i have some questions about the tesla turbine: is a tesla turbine more efficient than a steam engine or a stirling engine ? about the discs of the tesla turbine warping because of the high speed rotations; does running the engine on a lower speed solve that or will the discs warp anyway after time ? what is the difference in efficiency between the tesla turbine running at high speed and running it at a lower speed ( as fast as possible but low enough to not warp de discs) and: i...
Thread 'Where is my curb stop?'
My water meter is submerged under water for about 95% of the year. Today I took a photograph of the inside of my water meter box because today is one of the rare days that my water meter is not submerged in water. Here is the photograph that I took of my water meter with the cover on: Here is a photograph I took of my water meter with the cover off: I edited the photograph to draw a red circle around a knob on my water meter. Is that knob that I drew a red circle around my meter...
Back
Top