CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

wiper motor control with encoder
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ertansuluagac



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

View user's profile Send private message Send e-mail

PostPosted: Sun Apr 21, 2019 2:05 pm     Reply with quote

I understand. Does ex_encoder.c work? Also as circuit connection;
after I give a voltage, I will enter the A and B pins into my processor. You don't have another pin already. So I will now determine the position based on the number of pulses from A and B. There's nothing else I can do. I just want a sample code for this kind of engine. Is there no other example than ex_encoder.c ? Ttelmah wrote, I will write code with values for A, B. how can I write code ?
_________________
Es
temtronic



Joined: 01 Jul 2010
Posts: 9100
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Apr 21, 2019 2:25 pm     Reply with quote

EX_ENCOD.c does work, did almost 20 years ago...
There are 1,000s of PIC based 'encoder' programs on the internet but why not just use what CCS freely supplies ? We can help as we all have that program.

With simple AB encoders, you normally powerup, drive the motor one way to a 'home' position, There a switch tells the PIC 'I'm home', shuts off the motor, resets the encoder position pulse counter variable to 0. After that you tell the motor to run and count pulses. How long to run and how many pulses can be determined on the bench. That 'R&D' is out of our control, you'll have to test.

Jay
ertansuluagac



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

View user's profile Send private message Send e-mail

PostPosted: Mon Apr 22, 2019 12:50 am     Reply with quote

I understand, but I'm already using CCS C licensed software. I have version 5.085. I'm already trying to do with CCS C.
_________________
Es
Ttelmah



Joined: 11 Mar 2010
Posts: 19217

View user's profile Send private message

PostPosted: Mon Apr 22, 2019 1:40 am     Reply with quote

The point is if you have the compiler, you already have a program example
of how to read an encoder. It's with the compiler.....

In the examples directory.
ertansuluagac



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

View user's profile Send private message Send e-mail

PostPosted: Mon Apr 22, 2019 2:40 am     Reply with quote

I was understand. There are 4 examples.
1- ex_encry.c
2- ex_encod.c
3- ex_sk_rotary_encoder_isr
4- ex_sk_rotary_encoder.c
I think, ex_encod.c of them, seems to benefit me. or do you have any other suggestions?
_________________
Es
temtronic



Joined: 01 Jul 2010
Posts: 9100
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Apr 22, 2019 4:57 am     Reply with quote

#1 I think is for encryption..
#2 is what I suggest.. I know it works, simple to use.
#3, #4 I don't have, as I have a very old compiler version.

Jay
ertansuluagac



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

View user's profile Send private message Send e-mail

PostPosted: Mon Apr 22, 2019 6:20 am     Reply with quote

I understand. I'll try ex_encod.c. I will write the result. Thanks everyone.
_________________
Es
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group