I made a very simple circuit for LED to blink.
The code is as follows:
# include
# define F_CPU 2000UL
# include
int main (void) {
DDRB | = _BV (DDB0);
while (1) {
PORTB ^ = _BV (PB0);
_delay_ms (1);
}
}
The processor is an ATMEGA324PA with clock = 20 MHz.
The fuses are:
lfuse = 0
I have a simple program for ATmega324PA:
#include
#define F_CPU 2000UL
#include
int main (void) {
DDRA = 0xFF;
while (1) {
_delay_ms (1);
PORTA = 0X00;
_delay_ms (1);
PORTA = 0XFF;
}
that on Port A works perfectly and generates a square wave on all pins.
The sam
Hi,
My program does'n recognize MCUCR and JTD.
#include
#include
#include
#include
#include "lcd_lib.h"
MCUCR = (1 << JTD); // ERROR on MCUCR and JTD
What is missed?
Thank you.
Domenico
---
Questa e-mail è priva di virus e malware perché è attiva la protezione avast!
Antivirus.
I would like to use Netbeans to develop AVR-GCC but I had just started a
small problem.
I created a new Netbeans project using source code for atmega324pa
already successfully developed previously.
The editor of Netbeans correctly recognize all symbols except two: MCUCR
and JTD.
Has anyone encou
Hi,
After spending more than one day to create an array of struct I have
come to this code:
struct Lamp {
uint8_t highAddress [9] ;
uint8_t lowAddress [9] ;
uint8_t onoff ;
uint8_t active ;
uint8_t power;
uint8_t brightness ;
uint8_t temperatures ;
uint8_t faultCount ;
} ;
stru
Hi,
After spending more than one day to create an array of struct I have
come to this code:
struct Lamp {
uint8_t highAddress [9] ;
uint8_t lowAddress [9] ;
uint8_t onoff ;
uint8_t active ;
uint8_t power;
uint8_t brightness ;
uint8_t temperatures ;
uint8_t faultCount ;
Hello,
my problem is the following:
suppose we have 8 keys all connected to the same port (for. eg. D) of an
AVR processor (eg. ATmega324) and that all pins have the interrupt enabled.
If I understand correctly, when I press any key is called the same ISR
(PCINT3_vect) and a single flag is set
Please consider this code:
#define KEY_PORT PORTD
#define KEY_DDR DDRD
#define KEY_FUNC_SEL PIND4 // --> first key (Port D pin 4)
#define LED_PORT PORTB // Test led, to see action on keypress
#define FUNC_SEL_KEY 0x10 // First function --> first key (Port D pin 4)
int main() {
x
todd.batz...@millerwelds.com
www.millerwelds.com
Please consider the environment before printing this email.
-Original Message-
From: avr-gcc-list-bounces+tbatzl=millerwelds@nongnu.org
[mailto:avr-gcc-list-bounces+tbatzl=millerwelds@nongnu.org] On Behalf Of dfx
Sent: Tuesday, January
7075929
Il 15/01/2014 02:18, Pink Boy ha scritto:
dfx see notes below.
// #define KEY_FUNC_SEL PIND4 // --> first key (Port D pin 4)
// in WinAvr PIND4 is a bit position and is equal to 4
#define KEY_FUNC_SEL (1< // PORTD is the output register for PORTD. To read the port pin
state you n
Hi,
often in code written by 'gurus' I find expressions of the type
# if defined (__AVR_ATmega168__), but looking at the code I can not
find the definition anywhere.
The question is: where these symbols (with double underscore) are defined?
thank you very much
--
Domenico
---
Questa e-mail
Hi,
I need an editor that allows to create / edit binary files.
Basically I need an editor that by typing 0 and 3 shall not enter two
characters 0x30 and 0x33 but only one byte 0x03.
Could I have some suggestions?
Thank you very much.
--
Domenico
---
Questa e-mail è priva di virus e malwar
12 matches
Mail list logo