Author |
Message |
Topic: 12f675 lookup table too large? |
Jim McBride
Replies: 11
Views: 12065
|
Forum: General CCS C Discussion Posted: Mon Jul 26, 2010 8:59 am Subject: 12f675 lookup table too large? |
I guess I will have to rethink how to do this then. The variables are what manipulates the ramping of the speed up and down. Granted what you are saying is easy for when the "go" button is p ... |
Topic: 12f675 lookup table too large? |
Jim McBride
Replies: 11
Views: 12065
|
Forum: General CCS C Discussion Posted: Fri Jul 23, 2010 7:27 pm Subject: 12f675 lookup table too large? |
OK, leaving for the weekend anyway. But just so I am clear. One of the problems is that when you put A2 to a logic high level, there should not be any pulse coming out. But there is...... |
Topic: 12f675 lookup table too large? |
Jim McBride
Replies: 11
Views: 12065
|
Forum: General CCS C Discussion Posted: Fri Jul 23, 2010 5:53 pm Subject: 12f675 lookup table too large? |
I ran it with a 16F877 with vs. 4.109 on a PicDem2-Plus, and I get
pulses at a 12 Hz rate. I grounded pin A2.
You should get a pulse if a2 is grounded, NO pulse if a2 is at 5 volts. A higher adc rea ... |
Topic: 12f675 lookup table too large? |
Jim McBride
Replies: 11
Views: 12065
|
Forum: General CCS C Discussion Posted: Fri Jul 23, 2010 3:23 pm Subject: 12f675 lookup table too large? |
compiler is PCH 3.188, IDE 3.43
By simulator I am referring to the MPLAB simulator. CCS only has a debugger right?
I am using a scope to measure the output pin in the program pin_a1 (GP1).
A ... |
Topic: 12f675 lookup table too large? |
Jim McBride
Replies: 11
Views: 12065
|
Forum: General CCS C Discussion Posted: Fri Jul 23, 2010 2:21 pm Subject: 12f675 lookup table too large? |
OOPs, typo on the uC model. it is a 675 not 674...
I have used the CCS Wizard to setup the basics of the code.
Header file:
#include <12F675.h>
#device adc=10
#use delay(clock=4000000 ... |
Topic: 12f675 lookup table too large? |
Jim McBride
Replies: 11
Views: 12065
|
Forum: General CCS C Discussion Posted: Fri Jul 23, 2010 10:22 am Subject: 12f675 lookup table too large? |
I have this code which simulates perfectly. Better than I had hoped actually.
However, when the chip is programmed, it gives out a constant ~12Hz pulse regardless of the ADC reading or enable input. ... |
Topic: Look-up table for 16 bit values How-to? |
Jim McBride
Replies: 8
Views: 9979
|
Forum: General CCS C Discussion Posted: Tue Jul 20, 2010 2:15 pm Subject: Look-up table for 16 bit values How-to? |
You have me thinking in a new direction. Well actually two old directions, that for individual reasons, failed, but might work combined.
Delay_time being used in a while(x){x--;} loop delay?
Th ... |
Topic: Look-up table for 16 bit values How-to? |
Jim McBride
Replies: 8
Views: 9979
|
Forum: General CCS C Discussion Posted: Tue Jul 20, 2010 1:40 pm Subject: Look-up table for 16 bit values How-to? |
Thank you ckielstra,
I have looked and thought about that but unless I am just missing something, it does not solve my problem.
Long delays are not a problem, I can use delay_ms(byte).
It is the re ... |
Topic: Look-up table for 16 bit values How-to? |
Jim McBride
Replies: 8
Views: 9979
|
Forum: General CCS C Discussion Posted: Tue Jul 20, 2010 1:21 pm Subject: Look-up table for 16 bit values How-to? |
I guess that makes sense, bummer. Lets go about this from a different angle. I want 32 different delays ranging from 10hZ to 7kHz. A case statement takes longer and longer to get to the last case and ... |
Topic: Look-up table for 16 bit values How-to? |
Jim McBride
Replies: 8
Views: 9979
|
Forum: General CCS C Discussion Posted: Tue Jul 20, 2010 1:00 pm Subject: Look-up table for 16 bit values How-to? |
Wow, I did not expect the data table would be so easy. But I am not sure if it will work for me.
ide v3.43
pch v3.188
PIC12F675
As you pointed out previously (in another post), my compiler ver ... |
Topic: Look-up table for 16 bit values How-to? |
Jim McBride
Replies: 8
Views: 9979
|
Forum: General CCS C Discussion Posted: Tue Jul 20, 2010 11:40 am Subject: Look-up table for 16 bit values How-to? |
I have never used a look-up table and can't seem to find any helpful posts to get me the basics. Neither have (yet) I been able to find any direct example code in my "old" compiler sample co ... |
Topic: Open loop stepper controller. |
Jim McBride
Replies: 6
Views: 7982
|
Forum: General CCS C Discussion Posted: Mon Jul 19, 2010 5:29 pm Subject: Open loop stepper controller. |
Handy to have, but the overhead might be too much for the faster frequencies needed. This could probably work if a test was done to see how long of a delay was needed and then branch to different dela ... |
Topic: Open loop stepper controller. |
Jim McBride
Replies: 6
Views: 7982
|
Forum: General CCS C Discussion Posted: Mon Jul 19, 2010 1:36 pm Subject: Open loop stepper controller. |
IDE V3.43, I guess that is a little out of date. I guess a newer version is in order. It won't solve all my problems, but it will make things much simpler. Thanks. |
Topic: Open loop stepper controller. |
Jim McBride
Replies: 6
Views: 7982
|
Forum: General CCS C Discussion Posted: Mon Jul 19, 2010 1:12 pm Subject: Open loop stepper controller. |
If I understand the limitations correctly, the delay_*() functions can only accept a byte as a variable. This works fine for delays in the range of 3k to, say 40kHz. It is when I want pulses all the w ... |
Topic: Open loop stepper controller. |
Jim McBride
Replies: 6
Views: 7982
|
Forum: General CCS C Discussion Posted: Mon Jul 19, 2010 10:11 am Subject: Open loop stepper controller. |
while(1)
{
delay_ms(100);
faux_speed = 0;
while(!input(pin_a2))//go button = 0 (pressed)
{
... |
|