Search Engine www.edaboard.com

Pic Prescaler

Add Question

36 Threads found on edaboard.com: Pic Prescaler
i am using pic16f73 and timer0 and clock frequency 8MHZ of prescaler 1:16 by using formula vaule= (required delay* fosc/4*prescaler for 1ms delay value =125 but it was not working real time.....its output delay coming around 25micro se void delay(unsigned int a) { unsigned int i=0; for(i=0;i
hello Q=20Mhz MC=0,60?S if 8051 timer is similar to pic timer you need to spend 1666 * 0,6 => 1 mS load the timer with 65535-1666=63869 .. TH0= 0xF9; //initial value for 1ms TL0 = 0x7D; 0xF97D => 63869 so seems to be OK if timer has no prescaler or potsscaler and use MC as clock.
Hello there I am using pic16F1936 on the point where I am,i need to use Timer 1 which provide the scale for Frequency and voltage division/Multiplication for my experiment,I now have difficulty in configuring this pic to use the Timer 1 as a counter,see the codes below could any one help me to handle more this? BANKSEL T1GCON ;Gate control
I have developped a product with a pic 16F505. The hardware is stable (at least 100 boards finished). I decided to make modifications but the computer with Win2000 and the 9.60 compiler is out. Now it is XP SP3 and a new C compiler with also MPLAB v 8.91.00.00 and an ICD2.5 (ICD2 before). After a few hours I found that the prescaler does not
/* Frequency 8Mhz */ void main() { PORTC=0; //Clearing output port TRISC=0x00; //Initialising C port as output T2CON=0; //prescaler for timer (1:1) Timer2 off CCP1CON=12; //Initialising ADC TMR2ON_BIT=1; // Turning On timer 2 PR2=199; // Setting Time period/Frequency CCP
Hello friends, Here is my small project..Measuring frequency with pic CCP capture module. It Has good resolution and give result as 00.00Hz Range is : 15Hz to 120Hz ...I used it for measuring 50Hz line frequency. compiler : MikroC Pro for pic V6.0 Xtal : 16 MHz Timer1 prescaler : 1:8 LCD : 20x 4 RC2 pin is input for capturing.
hello i am trying to configure WDT in pic for 16msec but after so efforts i am unable to get reset. #include"p18f4520e.h" #pragma config OSC = INTIO67 // INTERNAL OSCILLATOR IS ON #pragma config DEBUG = OFF // DEBUGGER IS OFF #pragma config WDT = ON // WATCH DOG TIMER IS OFF #pragma config LVP = OFF
Hi all, i am new in pic for 16f877a, can anyone have any example on how to have a timer triggering in this pic. I want to make a system which will check value of Current, and then attach loads according to requirement. There are three loads, when current increases from 10A, one of the load turns off. I need a program which will check va
i need equation to convert value in TMR1L into microseconds on pic 16f877a using mikroc language plzzz anyone help me !!!! :( - - - Updated - - - my code using mikroc language: i'm using pic 16f877a , timer1, internal clock int Dis; int Dur; int T; void main() { TRISB.B7=1; // i/p for pic TRISB.B6=0; // o/p for pic while
I generated pulse sequences and I would like to measure the time between two pulses with the same pic not use anther one You can fire a timer after delay_ms(1); and before you call that delay again, you can check the timer counter's value and according to the clock of the MCU, prescaler etc you can use the equations that hope
Hello all, What is the pic SPI protocol clock frequency range and data rate range?? Thanks, Siddesh It depends on pic so you should check the datasheet. give me your part number. I saw till 25Mhz
hi I need some help regarding Internal Oscillator i m posting my code below void timer_int(void) { T0CON = 0b11011111; //prescaler not assigned TMR0L=253; OSCTUNE = 0; OSCCON= 0b01111110; //Internal 8MHz Oscilator as primary Oscillator INT
Hi friends, I am using adc module in pic18f4550. I just gave a dc signal to the module and varied it with a pot. My ADRES register shows some value,but that is not the one I am expecting.I am not knownig where I am going wrong. I ave just copied my code below. #include void interrupt isr(void); void main() { TRISA = 0XFF;
HI; i want to count the pulses using pic16f877a. the pulses are being fed into pin RA4. i want to use timer interrupt for that so that other functions performed by the mico should not disturbed. the frequency is displayed on the LCD Screen. kindly help me with Mikro C code. thanking you in anticipation.
As per the figure in the T0CKI High Pulse Width it takes No (prescaler 0.5TCY + 20) times that mean to capture the High Pulse Width of external clock, the MCU takes 0.5TCY + 20 times This is related to pic16f877a It would be much appreciated any one can explain this scenario 77078
Hello, I am trying to program an MCU in assembly to generate a square wave. I would like to achieve the maximum generated waveform frequency. The pic16f84A has an internal prescaler so driving it with a clock of 20MHz generates a much less frequency. Are there other microcontrollers (pic prefferred) which operate in greater frequencies? I (...)
1. I'm guessing you are using a pic. What type is it? 2. Always use banksel, it will save you hours of debugging. In general, use a suitable prescaler to lower the speed the timer increments. For example if you use 1:8 it will count at 1/8 of the internal clock rate. Then work out the value you need to load into TMR0 so that after 1mS it rolls ove
How a high frequency ,say 50 MHz is measured using a pic16 with 4MHz clock? What actually is the method used in this case? Because I could assume it if it is a low frequency of few such case, I hope it could be done by timer increment on external clock.... But the 50 MHz is confusing me...Pls check the link below: [url=electronics
Ok I have a FLL transmitter circuit, the VCO works well on its own, however when I place the prescaler for the pic micro near the circuit the digital roar from the 74ac logic screws everything up due to harmonics etc. I was wondering how big a cutout I could have in my screening can made from single sided PCB I could have. I was planning on putti
I use watchdog = 1 to activate the watch dog in proton basic and i use watchdog = 0 to dactivate it Now if I use Timer0 prescaler for it how may i assign it to watch dog time? May I use Option_reg? or else 2 If i use timer) prescaler for watch dog time if WDT will reset the device if the crystal oscilator of the pic stop running?
Hi smm4k, Try this: LIST P=16F72 #INCLUDE __CONFIG _BOREN_OFF & _BODEN_OFF & _CP_OFF & _PWRTEN_OFF & _WDTEN_OFF & _WDT_OFF & _XT_OSC ;Using pic16F72 to run TMR0 from external source (RA4/T0CKI) and display on PORTB ;Every Time the input source goes from low to high, PORTB is incremented ;Compiler: MPASM (MPLAB IDE v8.
done exactly with a 12MHz clock. you should adjust the clock as we dont get exactly 120khz ' Timer0 Registers: ' prescaler=1:1; TMR0 Preset=231; Freq=120 000,00Hz; Period=8 333 ns OPTION_REG.T0CS = 0 ' bit 5 TMR0 Clock Source Select bit:0=Internal Clock (CLKO) / 1=Transition on T0CKI pin OPTION_REG.T0SE = 0 ' bit 4 TMR0 Source Edge
Hello, Can anyone let me know how can I generate a clock of about 30KHz on the output of one of the pins of PORTC, In parallel to the main program. Meaning that I do not wan this clock freq’ to be affected by the Main Program code length or delay. The clock should be with duty cycle of ~50%, and the crystal is 4MHz using pic 16F887A.
Hi friends I am having basic doubt ,what is the use of prescaler and postscaler in pic micro controller.What i want to know is what actually they do in pic.:D can u give the details of prescaler and postscaler
Hello! I'm newbie pic mcu. I use WatchDog Timer at 1:65536 prescaler. (268s - 16F688). I don't know how many time WatchDog reset at 1:1024 prescaler (1:512, 1:256...). Could anybody help me this solution? Thanks very much! Best regards!
Hello, i think most of you probably saw this webpage: it is about how to make exactly 1 second delay on pics using interrupts. but my problem is i absolutely dont understand the heart of this algorithm. here is a fragment of code: he declares three variables, and assigns them values: (in DEcimal) bres
i have notice with pic16f737 and 12f683 that when i set wdtcon timer0 not work right. also if in the option register i set PSA=0 (prescaler assignet to Tmr0), the interrupt for tmr0 non work tipical setting of wtdcon that i have used was: Bank1 bcf OPTION_REG,PSA ; assign prescaler to TMR0 movlw (...)
Hi, I thought that the f_Osc is divided by 4 and then fed into the pic-core. This will mean that your program runs with 1MHz, if you set the prescaler to 2 you will have 500kHz frequency for you timer... Regards...
hi all what is the procedure for pic timer0 to generate a 1 ms or 1 sec interrupt. regards...
hi, I am using a pic 16f877a- I am trying to find the period of a signal being input to an input pin. To do it I start the timer (TMR0) when the the input pin goes high for the first time. after 20 periods of the input signal I stop the timer. by doing this I can divide the value of the timer at this point by 20 and then multiply the result b
This is exactly how it is accomplished: by sampling the prescaler output on the Q2 and Q4 cycles of the internal phase clocks. Why it is necessary? It is not really "necessary", but it happens, because the micro is in fact a sequential circuit, that is, it only does one thing at a time, so it will "look" ("sample")
Hi ! Using TMR1 and the pic main oscillator at 4MHz is impossible to have 60s counting, because the maximum prescaler is 8 (clock division). At 4MHz and prescaler = 8, TMR1 will overflow every 524288 us or aproximattely every 0,5s, as follows: 65536 x 1/fosc/4 x 8 prescaler 65536 x 1us x 8 = 524288 us If you use (...)
Hi ! If I understand your question, Timer 0 can be used for counting. It can count from 0 to 255 (8 bits) and it has an input pin for external pulses. TMR0 can also count using Fosc/4 pulses (the main pic oscillator divided by 4). The inputs can be divided by a prescaler (shared with Watchdog Timer, but you can use the prescaler for (...)
I'm designing a entry lock system based on a pic16F84. The system is working fine but once every few months or so it blocks, I think is due to interference in the mains. I tryied to start using the Watch Dog Timer to reset the microcontroller if it stalls but it resets the chip everytime it tryies to write a new code into the EEPROM even if I use t
Salam, 8051 is slow to count external pulses, use pic instead because it has internal prescaler attach to TMR0 (Counter). Bye Or better Ubicom IP2022, that have speeds up to 160MHz (and also 160MIPS), 4K data SRAM, 64KB Flash, 16KB Data/Programm SRAM, S232, or USB, or Ethernet ( need only external magnethics).