Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
thank ypu for reply mr klaus
really i tried by this formula
but it dosnt work fine
RegValue = cpu_freq / cycle_plses / freq / pulse_state / prescaler;
ofcourse i tried the calculator but is give the constant values
so i need to registers value every 5 second when chip are working
plz excuse me...
hello dear friends
I need your helps to find that formula to compute timer1 registers
for generate variable frequency... between 8Hz to 30KHz
know that the chip has not compare mode, only overflow
chip: PIC16F630
prescaler: 1, 2, 4 & 8
thank you
/// header file
#define cycle_plses 4 /// EVERY...
thank you MR
KlausST
The tachometer pulses one pulse per rotation
and thıs ıs my delay functıon
i tried 1uS and 10uS and 100uS
void DELAYING_10US (unsigned ddd)
{
while (ddd != 0) {
ddd--; delay_us (10); /// 1uS, 10uS, 100uS
}
and the TACHO_RPM
i...
Hello guys
I am trying to control the motor of a washing machine, and the problem I encountered is adjusting the RPM precisely compared to the value of the tachometer.
I am using a PIC16F628 microcontroller
void INTERRUPT ()
{
/// ZERO CROSSING FUNCTION ///
if (EXT_INT_FLAG) {...
You are correct, Mr.
KlausST
But if you remember that when I was defining an interrupt this way
ISR (INT0_VECT)
{
// do something
}
ISR (INT1_VECT)
{
// do something
}
ISR (INT2_VECT)
{
// do something
}
It was giving me an error message so it won't build
But when I define the...
I am very sorry, Mr.
KlausST
I understand very well what you are saying and thank you very much for that
Of course, I don't want anyone to do my work, or I won't learn anything
The problem is that I'm trying to deal with the code at the registrar level
I've been busy reading the datasheet very...
Unfortunately, I do not understand the sequence you mentioned
So please write me an example
As for the external interrupt, it must be tried
Anyway, I am waiting for the controllers, and when they arrive, I will test them and let you know the result
But I think it will work in principle because...
KlausST
I can't test it right now because I don't have controllers yet
ıt ıs just compiling and building
But when I receive the controllers, I will test it and let you know the result
Or if someone can test it right away
I think this code is compatible with a lot of controllers
But what do you...
KlausST
betwixt
danadakk
andre_luis
Thank you all for your attention and help
The problem has been resolved
It was all because of the wrong definition
void EXT_INT0_ISR ()
{
ZC_FLAG = 1;
}
void EXT_INT1_ISR ()
{
TACHO_COUNTER++;
}
In this way, it was built without errors
But I still need...
Thank you MR.
betwixt
In fact, I deal with all the interrupts inside the main function
I don't put any time delays in the external interrupts
As well as the definition of the pin of the interrupts as inputs with high value
void IO_INIT (void)
{
DDRA = 0x00; // PORTA INPUTS
DDRB = 0xFB; //...
In fact, I would like to thank you all for interacting with me and helping me
This is the complete code
please help
#include "INITS.h"
#include "VARIABLES.h"
#include "LOCK.h"
#include "PUMPS.h"
#include "VALVES.h"
#include "HEATERS.h"
#include "SENSORS.h"
#include "PRESOSTAT.h"
#include...
thank you
KlausST
As you can see in my code
I have defined all the external interrupts according to the datasheet of the controller
But I searched the Internet and found most of the codes use a library of external interrupts
This is the link
avr interrupt library
Of course I tried to include...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.