PIC16F870

Status
Not open for further replies.

tinky

New Member
Hello,
I am currently working on a project which requires me to use the PIC16F870 chip ... I have already programmed it in Basic using the Proton Plus Software and am having a lot of trouble when I try to integrate a certain movement of my machine into the code -- when I tested the PIC with the machine, the movement was really off and the machine wasn't doing what it was supposed to be doing as prescribed by the code written. The weird thing is, is that I had programmed the sensing aspect and tested it with the machine and it worked perfectly, but when I integrated the movement of external limbs, the machine just went crazy. I have a copy of my code in a .txt file as well as a diagram and pseudo code of what I need the code to do ... Would anyone be willing to take a look at my code to see what I'm doing wrong? I've showed a few friends and they can't seem to see what's wrong with it ... If anyone is willing to help me out, it would be greatly appreciated!!!
 
Hmm interesting project. Just post your code here, somebody will certainly take a look at it (I don't know Basic very well).
 
okay, i have posted here the txt file of my code written using Proton Plus software to program my PIC16F870 ... if anyone is willing to help me, i can email you the diagram of my machine and the pseudo code of it.
 

Attachments

  • mycode.txt
    3.2 KB · Views: 346
Hi Joel,
All I know is that when I added the code to control the movement of the external limbs the movement of my entire machine went wonky. The logic behind it is very simple and to put it into basic is very simple but for some reason, perhaps the way I have it, doesn't agree with the PIC?
 
the line in the code

' IF bRightSensor1 or bRightSensor2 = 1 then

shouldnt it be

' IF bRightSensor1 = 1 or bRightSensor2 = 1 then
 
Hi bloody-orc,
That's why I cant look at my code for too long; I miss things like that ... that part was commented after the wonky movements, but that mistake that you pointed out is probably the reason why the movements were all weird ... I'm testing again tomorrow and I'll see what happens ... boy do I feel like a big dork! :shock:
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…