SparkFun Forums 

Where electronics enthusiasts find answers.

Search found 10 matches

 Go to advanced search

AVR Timer: CTC mode

 by Athul ¦  Sat Nov 24, 2018 9:20 am ¦  Forum: AVR Microcontrollers ¦  Topic: AVR Timer: CTC mode ¦  Replies: 0 ¦  Views: 376

I learing AVR programming, I have made a code to toggle AVR pin at an interval using interrupts Here' the code #include <avr/io.h> #include <avr/interrupt.h> // initialize timer, interrupt and variable void timer1_init() { // set up timer with prescaler = 64 and CTC mode TCCR1B |= (1 << WGM12)|(1 <<...

LPC1768 and UART PCLK

 by Athul ¦  Wed Apr 18, 2018 1:32 am ¦  Forum: Everything ARM and LPC ¦  Topic: LPC1768 and UART PCLK ¦  Replies: 0 ¦  Views: 563

I've been trying to configure UART module of LPC1768. Board comes with a crystal oscillator of 12Mhz. It does nothing more than receiving a character and transmitting it at the same time. I am using Keil simulator. This is the code, #include <LPC17xx.H> void uart_init() { LPC_PINCON->PINSEL0 = 0X050...

Re: Configuring External Interrupt in LPC2148

 by Athul ¦  Wed Mar 07, 2018 11:49 am ¦  Forum: Projects ¦  Topic: Configuring External Interrupt in LPC2148 ¦  Replies: 4 ¦  Views: 415

There was some error in my code(register was EXTINT, not EINT). #include <LPC214X.H> #define BUZZER (1<<18) int i; __irq void isr() { IOSET1 |= BUZZER; for(i=0; i<1000000;i++); IOCLR1 |= BUZZER; EXTINT = 0X01; VICVectAddr = 0; } int main() { PINSEL1 |= 0X01; PINSEL2 |= 0; IODIR1 |= BUZZER; VICIntSel...

Re: Configuring External Interrupt in LPC2148

 by Athul ¦  Sun Mar 04, 2018 11:50 pm ¦  Forum: Projects ¦  Topic: Configuring External Interrupt in LPC2148 ¦  Replies: 4 ¦  Views: 415

Thanks for the reply
I have changed the values of EXTMODE and EXTPOLAR to trigger interrupt for rising edge falling edge and level sensitive triggering. But no matter what i do interrupt program executes first

Configuring External Interrupt in LPC2148

 by Athul ¦  Sat Mar 03, 2018 7:38 am ¦  Forum: Projects ¦  Topic: Configuring External Interrupt in LPC2148 ¦  Replies: 4 ¦  Views: 415

Hi, As part of my project, I am using a metal detector, which is configured as an external interrupt in Slot0. when I run the program for the first time, the controller executes the code in the interrupt subroutine instead of the main program even though interrupt is not triggered, I guess it's beca...

Re: Logic level conveter issue

 by Athul ¦  Wed Jun 01, 2016 1:32 am ¦  Forum: SparkFun Product Questions ¦  Topic: Logic level conveter issue ¦  Replies: 4 ¦  Views: 779

I figured out what's the problem. 10K pull up resistor on the HV side of logic level converter was too large in my case. I figured this out by doing, 1. connected 5V to IN terminal by a wire , measured voltage across it. Got 4.95 on DMM. 2. Connected 10K between IN and 5V got 3.7V if TL is not groun...

Re: Logic level conveter issue

 by Athul ¦  Mon May 30, 2016 2:51 am ¦  Forum: SparkFun Product Questions ¦  Topic: Logic level conveter issue ¦  Replies: 4 ¦  Views: 779

Guys anyone have any suggestions.
I really need help.

Re: Logic level conveter issue

 by Athul ¦  Sat May 28, 2016 12:09 am ¦  Forum: SparkFun Product Questions ¦  Topic: Logic level conveter issue ¦  Replies: 4 ¦  Views: 779

@DanV Thanks for the reply. My first doubt was that, so I tried to power the HV side of LLC from an external DC power supply capable of supplying current upto 5A. Untitled.jpg See the connection diagram and please let me know if there is any problem with it. Shouln't I connect all the GNDs together?...

Logic level conveter issue

 by Athul ¦  Fri May 27, 2016 2:49 am ¦  Forum: SparkFun Product Questions ¦  Topic: Logic level conveter issue ¦  Replies: 4 ¦  Views: 779

Hi, I've been using a bidirectional logic level converter in my CO2 laser cutter to convert 3.3V signals in to 5V signal, but I'm having some problems with it. For emitthing laser following condition needs to satisfied TL<0.3V WP<0.3V IN= 0-5 PWM I'm using smoothie board to control the machine, http...

Converting 0-3.3V PWM to 0-5V PWM

 by Athul ¦  Thu Apr 07, 2016 1:09 am ¦  Forum: Projects ¦  Topic: Converting 0-3.3V PWM to 0-5V PWM ¦  Replies: 0 ¦  Views: 359

HI, I'm using smoothie board smoothieware.org to control my laser cutter. Only problem is it's output PWM signal is from 0-3.3V and my laser power supply input PWM is 0-%v, and I need to conver 0-3.3V to 0-5V to get full laser power. Is there any way to convert 3.3V PWM to 5V PWM. I need conversion ...