Home >

atmega8 portc problem

  • ATmega8 Timer2 problemOctober 30

    I am using ATmega8 with 16 MHz clock and use Timer2 as PWM with this code: DDRB |= (1 << DDB3); OCR2 = 0; TCCR2 |= (1 << COM21); TCCR2 |= (1 << WGM21) | (1 << WGM20); TCCR2 |= (1 << CS21); OCR2 = 0; But after this code 0 PWM

  • How to detect change (1 or 0) on PORTC of Atmega8?June 30

    I have made PORTC.0,PORTC.1,PORTC.2,PORTC.3 as input and set it at high. The remaining pins are set as output and high. Thus all pins of PORTC are high. Now what I want to check that whenever any pin of PORTC gets low (0), then my function "setDirect

  • Having problem with Avr atmega8 codingOctober 6

    I am making a project on density based traffic signal system and using IR sensors for inputs and the sensor module produces digital output to the atmega8. Everything is working fine but when there is input from 2 pins simultaneously the condition isn

  • ATMEGA8 with 8Mhz crystal just running at 1MhzNovember 22

    I have a ATMEGA8A-PU with a 8Mhz crystal oscillator (T8.000 is 8Mhz isn't it?) and the following C code: #define F_CPU 8000000UL #include <avr/io.h> #include <util/delay.h> int main(void) { DDRC = 0b00100000; while(1) { PORTC ^= 1 << POR

  • ATmega8 to MCP23S17 SPI I/O Expander not workingAugust 25

    Since three days I'm having the problem that I can not talk to my MCP23S17 SPI I/O Expander from my ATmega8. I've double checked my circuit and I'm sure that I did that right. I want to apologize in advance for that much code but I really double chec

  • Why the led is blinking instead of keeping on atmega8

    Why the led is blinking instead of keeping on atmega8May 18

    I wrote a very simple sample code into my atmega8 via avrstudio here it is: #include <avr/io.h> #ifndef F_CPU #define F_CPU 1000000UL #endif int main(void) { DDRC = 0xff; while (1) { PORTC = 0xff; } return (0); } I am expecting all the Pins of PORTC

  • Problems driving leds with the MM5450August 3

    First what is my final goal: to drive 24 RGB LEDS using a microcontroller connected serially to a Micrel MM5450 LED driver. It would be nice to be able to drive all of them individually (72 LEDs), but I'll settle (as I did) for multiplexing and only

  • Serial programmer not working, what are the possible problem sources?

    Serial programmer not working, what are the possible problem sources?February 20

    I have been trying to make a serial programmer for AVR chips. I have been using this schematic as reference, . I made the circuit and have checked that the connections are correct. Here is a picture of it on breadboard The problem is it doesn't even

  • Wrong signature from ATMEGA8-16PU after setting fuses with avrdudeMarch 4

    I am lost in loading bootloader for Arduino Single Sided on ATMEGA8-16PU. Here is my problem. I made the Arduino Single Sided V3 Placed ATMEGA8-16PU in the board and attached it to the Parallel Programmer and attached external 9V battery. Accessed th

  • Replacing atmega8 with atmega328(arduino)

    Replacing atmega8 with atmega328(arduino)March 8

    I was supplied with an arduino board in a workshop(which is a very old version board) similar to : the board comes with atmega8 as a micro controller .. I wanted to increase the performance and memory of my micro controller, so I purchased an atmega3

  • When connecting to Ethernet through ENC28J60, why use ATmega88 instead of ATmega8?April 3

    I know the general differences between ATmegaX8 family (ATmega88, ATmega168, and ATmega328) and the ATmegaX family (ATmega8, ATmega16, and ATmega32). But I'm confused, as when I intended to work on a project to connect the ATmega8 to Ethernet using t

  • ATMega8 - PORT C - Digital Output IssueApril 13

    What I am trying to do is set pin PC0 of PORT C as output to light an LED. The code I am using for that is: //SET PORT C //PC0 = RELAY STATUS LED - O/P //PC1 = RELAY CTL LINE - O/P //PC2 = PUSH BUTTON - I/P //PC3 = SPARE - O/P DDRC |= _BV(PC0) | _BV(

  • Running my atmega8 at 5.5V, risky?July 18

    I have just received my first microcontroller, an Atmega8. I will soon be making a voltage regulation circuit for it to run at 5V, but I don't have all the parts yet. Instead, I have a 5V DC 1000mA adapter, and thought there's no reason it shouldn't

  • Problem Controlling Digital Potentiometer with Micro

    Problem Controlling Digital Potentiometer with MicroOctober 30

    I am trying to control a digital potentiometer with a PIC18F14K50 and am having a random problem (potentiometer not remembering correct value) when I power off then back on. The X9313 datasheet states that to initiate a save of the digital pots wiper

  • Atmega8 USART transmitting wrong data

    Atmega8 USART transmitting wrong dataDecember 7

    I'm trying to get USART working on my atmega8-16PU microcontroller. I've studied the documentation and took the examples of code from there. I've managed to transmit the data from microcontroller to PL-2303HX chip which is connected to my computer vi

  • SMS control using old Sony Ericsson and ATmega8April 4

    I'm a student and having a project that using an ATmega8-16PU to control simple alarm (just LED and Buzzer) with SMS (using a Sony Ericsson K508i as a GSM module). Refer to this link I have questions : Should i use internal 8Mhz or an extra external

  • Error reading characters over serial on ATmega8 using CVAVR (USART)June 21

    I am trying to program ATmega8 for testing purposes using CVAVR as cross compiler and avrdude GUI as burner. Though I am able to burn the program, I think I am missing something in the coding part. It may be quite silly. I have 2 questions: I am usin

  • Which software should I use to send data to MCU (Atmega8)?July 9

    I have made level converter circuit for RS232 to UART using MAX232. But I'm stuck, because I don't know how to send data to MCU. Googling the problem tells me to use hyperterminal but that is not available in Win 8. Please tell me how to do it? I'm u

  • full duplex serial communication with a laptop using ATMEGA8 USARTJuly 9

    Can anyone please tell me how to use ATMEGA8's USART to establish a full duplex serial communication with a laptop using a USB-to-Serial Adapter. I am working on a project in which I need to display accelerometer reading in a gui. But the problem is

  • Problem with transmitting data from PIC18F45K20 (C18) to MCP23017July 29

    I am currently testing the MCP23017 (slave device) 16 bit I/O Expander using a PIC18F45K20 with the C18 compiler to transmit data to the MCP23017. The address pins (A0, A1 and A2) of the MCP23017 are grounded. The serial clock (SCL) is running at 100

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 11 q. 0.600 s.