Search Engine

pic18 Timer

Add Question

Are you looking for?:
and pic18 , pic18 can , pic18 , can pic18
55 Threads found on pic18 Timer
Boolean Timeout; // Flag. If true, do whatever you want after the timeout. static int8 gtimer0_overflow; #int_timer0 timer0_isr() { if (--gtimer0_overflow == 0) Timeout = TRUE; } In your main code, you have to setup the timer0, initialise the global variable (...)
Hello all, Does any body know a good pic18 development kit with: -LED (at least 1) -ADC (at least 2) -RS485 (at least 1) -Programmer included -C compiler and C example code for digital I/O, ADC, RS485, EEPROM, timer included Thanks for reading Look at at MMH-pic18
I am using a pic18F24K20 and would like to know how to set up timer1 and the interrupts. Does someone have an example I can work from?
Hi, pic18 unlike AVR does not have Clear timer on Compare in timer 0, but only in timer 2. T0 is a 16-bit timer (you can configure it for 8-bit if you want). So it counts from 0 to 65535 and then back to 0. I gave 0xF82F to TMR0 (H and L), so that means I preloaded it with 63535. So T0 starts counting (...)
Hi, why do we need to set the configuration as follow most of the time? whats the story behind? can anyone tell me here? thanks #pragma config LVP = OFF #pragma config WDT = OFF
hii all am currently working on a project which makes use of mma7260 accelerometer I want to find out the vibration frequency using accelerometer to monitor vibrations the hardware used here is accelerometer mma7260 with pic18F452 compiler is mikroC pro for PIC The zero offset voltage out of mma7260 is typically 1.65 Volts, i want to d
Dear all, I'm using a PICDEM USB mounted with pic18F4550 and I'm using the C18 compiler. I want to measure a certain period of time at one of the PIC's inputs, lets say between a falling edge and a rising edge. so what i need to do is to store the value of a "timer" at the falling edge moment and store it again at the rising edge moment and do
hello, please help me to design a system using pic18 microcontroller that base on the current mechatronics product available in the market. my design shuld use interrupt peripheral, whit at least three of the following item: 1) hardware timer/counter 2) analog to digital converter (ADC) 3) LCD 4) relay/valve/ moto
Hi there , I am in a midst of a project and has some question to ask about micro controller. This is what one of the function that I would like to carry out in a micro controller and I would like to know whether it is workable and if it work , how do I go about doing it. Lets make the delay as 2 second. lets take the () bracket as the delay
Here are a few tutorials which cover the pic18F timer modules: Introduction to pic18′s timers ? PIC Microcontroller Tutorial Microchip timers:
Hello and Salam (if you're ******) Base on frequency meter code by Rajendra Bhatt of, I made a tachometer reading using pic18F458 timer0 (configured to 8 bit and read from RA4 pin) but before making the actual circuit, I had it simulated using Proteus. Here's the code sbit LCD_RS at RC2_bit; sbit LCD_EN at RC3_b
There are several "timer" tutorials available online as well as documentation concerning the topic: timer0 Tutorial (Part 1) - Microchip timer0 Tutorial (Part 2) -
Hi All , One question for electronic expertise, I have pic18f25k22 , which is a great microcontroller, I made small project which is connect to GSM modem and temperature sensor , the project will send me SMS every 20 Minutes, the pic18 will read temperature them send sms using gsm modem , then after that the pic18 will be switch (...)
Hi guys ^_^ I have a problem in pic18F6520 CCP4 compare module. I work in a project that includes controlling a DC-to-AC inverter using pic18, all I need is a 50Hz signal with 50% duty cycle. so 50Hz = 20ms, 1st 10ms will be + and last 10ms will be - in order to control the inverter circuit. I saw Tahmid's code, modified it so it can su
The LCD is displaying time and date along with some symbols in between in a fluctuating manner. Please some one help me to solve the problem. #include #include #include #include //#define _XTAL_FREQ 4000000 // 4 MHz clock //__CONFIG(0X3F39); #define LCD_EN PORTCbits.RC2 #define LCD_RS POR
Hi guys, I am new with the PICs and compilers and I have to use it in a part of a project.:| I am using the pic184520 and the MPLAB 8.86 C compiler. Im trying to read txt file and send it by USART My code: /* Serial Communication Transmit Example */ /* Using Port C as a USART Port */ #pragma config OSC = HS /*set osc mode t
Hello, I'm working with a pic18 and I want to put this PIC into sleep mode and wake it up every 3 minute. How is that possible? The WDT can put the PIC into sleep only 2.3 seconds. The IDE I'm working in is MikroC Thank you
hi Good. for PIC microcontrollers if want to make your RTOS premptive select the pic18 architecture because the Stack is editable. Hope u follow the thing regards Gopi
Hi, I have built a system to read temperature using the DS1621 and the PIC16F819. This PIC reads the temperature from the DS1621 through I2C and sends the data to the computer through RS-232. I am using the following code for tests (PIN_B1 and PIN_B4 are the ones used for the I2C communication): I'm using PCM 3.235 version. #include <16F819
Hello Guys, Anybody has some documents/links to share how to design preemptive RTOS on pic18? Or are there any Software that supports Preemptive RTOS (similar to Salvo but this case a preemptive RTOS instead of cooperative). One high priority task of my applcation (the highest priority task on my applciaiton if running anyway) is to be pe
Hi All! I'm building a small USB device which will connect into a Windows PC. This device should have 8 pairs of connectors and its role is to detect which pairs are shorted and send this data to the host PC. The USB device should repeatedly (on some interval) send a status code to the host PC. For example, if only the first and last pairs a
The p18f4550 does not have an option register. This register is usually used on the mid range devices to set up the timer_0/WDT prescaler and the interrupt enables for the int pin, timer0, port b change and their interrupt flags. On the pic18, these have their own registers. Also, never ignore compiler warnings unless you understand (...)
there are RESET instruction available in many microcontrollers.u can use that. for ex.. pic18 series has RESET instruction, using that resets program counter and also some registers .but in PIC16 series there is no Software RESET instruction,where u can use GOTO will force the program counter to start from Initial location but it doesn'
Hello everyone, I have the following problem: I have many buttons as an input connected to pin RB0 RB1 RB2 RB3 RB4 RB5 RB6 RB7 and led in pin RD0 RD1 how to change the interrupt state is not detected? #define PIC_CLK 4000000 #include <pic18.h> __CONFIG(1, HS); //for freq>8Mhz and <20Mhz, use XT instead of HS for <8Mhz __CONFIG(2,BORDIS
As well as I Know timer0 never stops In PIC16 but in pic18 you can use TMR0ON to stop or start timer
Hi, I'm having troubles trying to simulate a simple analog comparator on pic18F4550(or 18F4553) with proteus(already tried versions 7.2 sp6 and 7.5 sp3) using PIC16F877 the same code works on proteus without a problem. the relevant code is: --start #include <18F4553.h> #FUSES NOWDT //No Watch Dog timer #FUSES NOMCL
I am writing a program on this pic18 that takes measurements, writes to flash, then waits around for 15 minutes (or some other user-defined time period) until it does it again. It is supposed to do this for 2 weeks, so I need to conserve battery. What's in my mind is to put the PIC in sleep mode, then trigger an interrupt off an internal time
Mayyur, in the pic18, you have two vectors pre-defined. The high priority at 0x08 and low priority at 0x18. You can take advantage of that and assign some of the interrupts as high priority and some as low priority. If you don't want to use that, you can always just 'poll' for the interrupt flag. So, for example, when an interrupt occurs, you c
hi.. i m writing a program in ccs coding using pic16f877a...i m using 3 variables x,y and z.. program runs successfully for x and y..but as soon as i include z in the program..OUT OF RAM appears in says to use the #separate statement..and i don't know how to use it..plz help here is my program
Hello guys I'm testing a simple CCS program on ISIS. I'm using a pic16F877 (20MHZ) it compiles fine but no PWM is shown in ISIS. i know the problem is on ISIS because i had a similar prog running fine on hardware. has anybody managed to show PWM on isis from a 16f877 ? thanks a lot. //#include "speed control.h" #include <16F877.h>
Check out this link. It may help you. Introduction to pic18's timers - PIC Microcontroller Tutorial | eXtreme Electronics . Regards, Jerin.
#include <16F877A.h> #device adc=8 #FUSES NOWDT //No Watch Dog timer #FUSES HS //High speed Osc (> 4mhz) #FUSES PUT //Power Up timer #FUSES NOPROTECT //Code not protected from reading #FUSES NODEBUG //No Debug mode for ICD #FUSES NOBROWNOUT
hi i have some project that i made i hope that help you so i used just tow 7 degement and i have no problem i give you here the prog that i manage a controle tempreture and i display it also with the picture of the circuit this is the code of th .h file #include <16F876A.h> #device adc=8 #FUSES NOWDT //No Watch Dog T
Hi, If that is the only thing your uC has to do, you may use a delay (otherwise you may use a timer); First find time to operate one instruction cycle; Tcy (base on your oscillator speed for pic18 it is; 4/(Osc speed) seconds); Find value; how may instructions should be wasted to achieve delay-time; Write a code to waste that much of in
I have a project and I can't figure it out why it isn't working the I2C. I need to transfer some data from a PIC16F877A to another using I2C. Here is the code: Master.h #include <16F877A.h> #device adc=10 #FUSES NOWDT //No Watch Dog timer #FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz
Hi all now I'm working with a automotive project. whixh uses a pic18F8520. but i have som hardware issues. 1.when i switch on the device it will not start until i removed the power jack and reconnect it( I am sure that there is no loose connection something. i'm using a 1117 3.3 v regulator for PIC) 2.When the device was works
Hello and AoA every1 Kamal here, can anyone please guide me about the development of an RTOS? i have to design an RTOS as part of my FYP, and i have read number of books about RTOSes and i know lots of basics about RTOSes but the problem is the development which unfortunately i cant do and i'm unable to get/find any help about that.....i know R
Hello everybody.I want to write a program using pic18F452&XTAL=20MHZ in C or mikroC to do the followings; 1.Simultaneously turn a timer on to count for 1 sec. and also count the number of High state of the input signal. 2.Turn a timer on for 1 sec. and as soon as a input signal injected
can u help me with the embedded C code...i m using a pic18 microcontroller need a timer of 100msec..
Hi, I need to interface a potentiometer with a servo motor via the PWM module of PIC 18F4550 using mikroC. Can it be done? If so, please help me out. Thanks in advance. Servo motor needs 50Hz PWM. What I know, PIC16 PWM Module can't generate low frequency at 50Hz. I don't know how pic18. The option is generate 50Hz si
Both. Im stuck with both problems This is my function to display number. You can display in any order like decimal, hexadecimal or binary. You can convert this into pic18. void lcd_number(unsigned int no, char base, char digit) {char i,j,di; for(i=0;i<=9;i++) di=0; i=0; do{ di=no%base; no=no/base;
As I have told earlier, the MCU which I am currently using is ATMEGA32L Yes, you have hidden the information in quoted text. An ATmega has no means to measure time intervals with ns resolution. PIC24 and some pic18 processors have an analog CMTU (charge time measurement unit), that converts time intervals to analog voltages. It
Hello all, I'm using pic18 Explorer Board's chip C18 Compiler I wro
Please read the interrupt chapter of the microcontroller datasheet, maybe you can get a better idea... An interrupt es an 'event' that happens inside the microcontroller, this 'event' is 'triggered' by internal or external means... (say a edge detected on an special input pin, or a timer overflow, or some communication event) this 'events' c
If you want to know from the basic to spi and i2c protocols and interfacing devices like motor, relay, DS1307( timer) go for the Muhammed Ali mazidi book for pic18. he start with the assembly and then C language. I think this is the best book. He also written book on 8051,AVR and intell etc.
its gud to know ur problem is solved. can you programm with ccs c compiler?.....i'll appreciate it if you can write your code with ccs. thanks thanks all....problem solved... the problem is that : i have to select hitech universal tool suit with hitech c pic18 compiler
yes I have same problem usb1 project from advanced PIC Microcontroller projects in c with pic18f Undeclared Identifier 'USB_Interrupt_Proc'
Hi pal, Permit me to join in the discussion.i compiled your code; #include "C:\Users\xyz1\Desktop\xyz_new\lab tutorial.h" #include <16F877A.h> #device adc=16 #FUSES NOWDT //No Watch Dog timer #FUSES HS //High speed Osc(>4mhz for PCM/PCH) (>10mhz for PCD) #FUSES NOBROWNOUT //No brownout reset #FUSES NOLVP /