Author |
Message |
Topic: Why doesn't this simple program work? |
Username
Replies: 11
Views: 13857
|
Forum: General CCS C Discussion Posted: Wed Feb 08, 2012 5:06 pm Subject: Why doesn't this simple program work? |
I know that pull-ups and pull-downs are a good way to reduce stray current, but i'm not sure that is causing the problem. Even when I take the button out of the circuit and jumper the pin directly to ... |
Topic: Why doesn't this simple program work? |
Username
Replies: 11
Views: 13857
|
Forum: General CCS C Discussion Posted: Mon Feb 06, 2012 4:29 pm Subject: Why doesn't this simple program work? |
Okay, so I added an if() function to allow it to go low.
I taking the PIC out of the breadboard jumper setup and just putting it into the pickit2 for programming, so it shouldn't be programmed wron ... |
Topic: Why doesn't this simple program work? |
Username
Replies: 11
Views: 13857
|
Forum: General CCS C Discussion Posted: Sun Feb 05, 2012 5:43 pm Subject: Why doesn't this simple program work? |
It still doesn't work after i changed it. Could you please explain a little of what's going on? Thanks |
Topic: Why doesn't this simple program work? |
Username
Replies: 11
Views: 13857
|
Forum: General CCS C Discussion Posted: Sun Feb 05, 2012 5:00 pm Subject: Why doesn't this simple program work? |
So where is it looping? The while(1) is there to stop the program from ending. I forgot to mention, the led that is connected to PIN_A0 is stuck on and doesn't respond to input changes on PIN_A1. I ... |
Topic: Why doesn't this simple program work? |
Username
Replies: 11
Views: 13857
|
Forum: General CCS C Discussion Posted: Sun Feb 05, 2012 4:22 pm Subject: Why doesn't this simple program work? |
I'm trying to make a very simple program, so I can better understand using TIMER0, and I can't get it to work. Can someone please help me out? I'm using a pickit2 and using the pickit2 program to w ... |
Topic: Have a few simple questions. |
Username
Replies: 1
Views: 3429
|
Forum: General CCS C Discussion Posted: Wed Jan 25, 2012 11:31 pm Subject: Have a few simple questions. |
Hey all,
A few months ago I started to use this forum and had no idea what I was doing, but now I know whats going on. But I have a few questions that I couldn't seem to answer myself from searching ... |
Topic: Can someone tell me why this doesn't code work |
Username
Replies: 16
Views: 17252
|
Forum: General CCS C Discussion Posted: Sun Nov 27, 2011 1:19 pm Subject: Can someone tell me why this doesn't code work |
Okay. So thats kind of what I assumed. The thing I still don't understand is what conditions have to happen for the timer interrupt to be executed? |
Topic: Can someone tell me why this doesn't code work |
Username
Replies: 16
Views: 17252
|
Forum: General CCS C Discussion Posted: Sat Nov 26, 2011 11:18 pm Subject: Can someone tell me why this doesn't code work |
I understand that after a certain amount of time, it returns a value on overflow. The one thing I can't understand after looking at countless uses of timer interrupts is:
How is it any different w ... |
Topic: Can someone tell me why this doesn't code work |
Username
Replies: 16
Views: 17252
|
Forum: General CCS C Discussion Posted: Wed Nov 23, 2011 3:04 pm Subject: Can someone tell me why this doesn't code work |
Thanks for all of your responses. I have a few questions though.
How will all of the modes be the same when it comes to flashes. If there was no input detected after execution the flashing, it ... |
Topic: Can someone tell me why this doesn't code work |
Username
Replies: 16
Views: 17252
|
Forum: General CCS C Discussion Posted: Tue Nov 22, 2011 10:08 pm Subject: Can someone tell me why this doesn't code work |
So do you think if I implement this code it will work?
int count;
Void Push_Button()
{
static int1 pushed = false;
if (!pushed && !button1) // Presse ... |
Topic: Can someone tell me why this doesn't code work |
Username
Replies: 16
Views: 17252
|
Forum: General CCS C Discussion Posted: Tue Nov 22, 2011 7:50 pm Subject: Can someone tell me why this doesn't code work |
Sorry, I never thought to check that. Okay, so it did create 2 different variables. How can I make it create just one global variable?
As to the debouncer, I think I remember reading about somet ... |
Topic: Can someone tell me why this doesn't code work |
Username
Replies: 16
Views: 17252
|
Forum: General CCS C Discussion Posted: Tue Nov 22, 2011 6:28 pm Subject: Can someone tell me why this doesn't code work |
#include "C:\Users\Admin\Documents\CCS Projects\main.h"
#define GP0 PIN_A0
#define GP1 PIN_A1
#define GP2 PIN_A2
#define GP3 PIN_A3
#define GP4 PIN_A4
#define GP5 PIN_A5
void ... |
Topic: Using EXT Interrupt with a goto. |
Username
Replies: 14
Views: 15101
|
Forum: General CCS C Discussion Posted: Thu Nov 03, 2011 3:48 pm Subject: Using EXT Interrupt with a goto. |
Okay, thanks for your response RF_Developer. I realized that what I was saying was pretty stupid. I had thought about having the program structered like you say I should, I thought using an interrup ... |
Topic: Using EXT Interrupt with a goto. |
Username
Replies: 14
Views: 15101
|
Forum: General CCS C Discussion Posted: Wed Nov 02, 2011 8:09 pm Subject: Using EXT Interrupt with a goto. |
What I am trying to do is have a button being pushed (it would cause the pin to go high) instantly switch modes of the program, even if the program is in the middle of a loop or another action. Since ... |
Topic: Using EXT Interrupt with a goto. |
Username
Replies: 14
Views: 15101
|
Forum: General CCS C Discussion Posted: Wed Nov 02, 2011 4:33 pm Subject: Using EXT Interrupt with a goto. |
Thats why I am asking how to write it correctly. I need the program to stop what it is doing when it sees a certain pin is recieving input, and go to the begging of the main section of code. It was ... |
|