I can find direction with this code:
A tied to portb.4
B tied to portb.5
Direction = portb.5 ^ portb.4
lcdout $FE,1,DEC(Direction)
but, the reading is NOT consistent , if I turn...
Type: Posts; User: luminas; Keyword(s):
I can find direction with this code:
A tied to portb.4
B tied to portb.5
Direction = portb.5 ^ portb.4
lcdout $FE,1,DEC(Direction)
but, the reading is NOT consistent , if I turn...
I thought about that , but I worried about DT-INT would block it in the process
is it possible to put this in-line with speed detecting process ?
i am not quite clear about it, is it something like this ? :
porta =00000001 direction is clockwise
porta =00000010 direction is counter clockwise
what happen with the direction WHILE the...
Hahaha, yes indeed 18F2431 would be overkill :)
Okay, the issue with rpm is clearer now, but what about direction ?
Thank Henrik !
I am planning to use 16F88 , but I will look at 18F2431 as your suggestion
As for the speed , it just 0 - 10 rpm max , with 100 count encoder.
The pic will then output led...
Is there any simple way (minimum code) to get encoder direction and speed / rpm , not position ?
Encoder is incremental type , output are A,B,Z
I am thinking about using DT INT , but not sure...
Ok, it works now . Thank you Aratti
how to get result C ?
C shall be byte size integer
input :
A : byte , function as a ratio to B
B : byte
output:
C : byte
SOLVED:
It was a bad solder :)
Sorry
I tried to blink a LED on portc.3 ( only on this port ) unsuccesfully.
Blinking on all other ports ( even on other portc ) were not a problem, so I must be missing something.
Any clue ?
Thank you Charles, great information :)
I will not use zener as it is not required now
I am wondering , what will happen when a millisecond peak voltage above the zener limit hit the analog pin ?
I want to limit the voltage on analog input pin, can I use a zener diode ?
my setup is as follow : v in ---> opamp --> rc filter ---> PIC
does it have side effect if I put zener between RC and...
Thank you comrades, I will place an order for 16F722A tomorrow :D
As for the upgrade, I would like to upgrade to PBP3 Gold, but I bought my PBP from digikey, and melabs said on their website that...
The device is virtually same, please take a look :
http://www.microchip.com/wwwproducts/ProductCompare.aspx?product1=PIC16F722&product2=PIC16F722A
As PBP 2.50 has no INC file for 16F722A , can...
I am planning to use 16F772A for my application.
I see PBP can handle 16F772 ( not A ) , question is, can PBP 2.50 handle this chip?
Thank you
Hi Ioannis,
My application is simple, it just read the potentiometer / analog pins and then output the pulse accordingly.
Usually I put a hardware RC filter between the pots and the pins. It serves...
Instead of hardware R/C filer to delay ACD input, is it possible to do it with PBP ?
You should use temporary counter like this:
start:
button blabalabla... click
if a= 1 then blablabla
etc..
goto start:
click:
a=a+1
Thanks Bruce, I will go with 2431. Have a nice day !
Thanks guys :)
I am experimenting with both PICs , both system run well as expected
Beside those hardware specific features, is the CPU utilization lower with power control pwm compared to...
PIC 18F2331 has feedback input and 8 power control pwm. This is suitable to your need.
As for usb connection to VB, just use normal usb to serial cable. This way you do not need to learn usb .
If 3 hardware pwm output needed and we have to choose between a 16F737 ( 3 ccp pwm ) and a 18F2431 ( 6 channel/ 3 pair power control pwm )
Which one is better ? Why ?
thanks Kamikaze
After few hours trying any possible setup, I solved the problem
The problem is with HSPLL config.
If I change the config to:
_FOSC_HS_1H
define osc 10, it works
I changed my code to :
main:
LCDOUT $FE, 1
LCDOUT $FE, $C0, "test"
hserout ["test" ]
pause 1000
goto main