-
Datei
fat.c
testing only #include "printf.h" //for testing only #endif U8 iob[BYTE_PER_SEC]; //file i/o buffer U32 FirstDataSector=0; U32 FirstRootSector=0; U32 FATFirstSector=0; U8 FATtype=0; #ifdef USE_FAT32 U32 FAT32RootCluster=0; U32 endofclusterchain=0; //value for END_OF_CLUSTERCHAIN U32 maxcluster=0; // last
in „AVR Studio: Großes Projekt aus mehreren kleinen erstellen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
fat.c
testing only #include "printf.h" //for testing only #endif U8 iob[BYTE_PER_SEC]; //file i/o buffer U32 FirstDataSector=0; U32 FirstRootSector=0; U32 FATFirstSector=0; U8 FATtype=0; #ifdef USE_FAT32 U32 FAT32RootCluster=0; U32 endofclusterchain=0; //value for END_OF_CLUSTERCHAIN U32 maxcluster=0; // last
in „AVR Studio: Großes Projekt aus mehreren kleinen erstellen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
#include <avr/io.h> #include <stdlib.h> #include <string.h> #include <avr/interrupt.h> #include <avr/pgmspace.h> #include <avr/eeprom.h> #define globals_main #include "main.h" #include <util/delay.h> //#include "
in „BLDC Ansteuerung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
12864UCY3_SSD1325.c * * Created: 06.09.2016 23:31:38 * Author : */ #define F_CPU 8000000UL #include <avr/io.h> #include <avr/delay.h> #include <avr/pgmspace.h> #include <avr/eeprom.h> #include "font.h" #include "ssd1325.h" uint8_t OLED_PIXEL[2][65][129]; uint8_t OLED_STATUS[10][128]; uint8_t OLED_LAYER_SHIFT
in „AVR Mega1284, Fontarray zu groß -> wie in Flash?“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
fat.c
last usable cluster+1 #endif #ifdef USE_FATBUFFER U8 fatbuf[BYTE_PER_SEC]; //buffer for FAT sectors U32 FATCurrentSector=0; #ifdef DOS_WRITE U8 FATStatus=0; // only for FAT write buffering #endif #endif U8 secPerCluster=0; #ifdef USE_64k_CLUSTERS U32 BytesPerCluster=0; //bytes per cluster #else U16 BytesPerCluster
in „ATmega32 + SD-Karte (Klabunde-Lib)“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
clock.c
" #include "../gui/main_gui.h" #include <avr/io.h> #include <avr/interrupt.h> //Bitzähler für RX Bit volatile unsigned char rx_bit_counter = 0; //64 Bit für DCF77 benötigt werden 59 Bits volatile unsigned long long dcf_rx_buffer = 0; //Hilfs Sekunden
in „xmega und dcf von u. radig“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
spi.c
**********************************************************************/ #include "spi.h" #include <avr/io.h> #include <avr/iom8.h> /* Êàê ýòî ïîíèìàåòñÿ SPI èñïîëüçóåò òðè ñîåäèíåíèÿ(SS ïîä÷èíåííîãî ìîæåò áûòü ïðîñàæå íà 0). Íî åñëè âû õîòèòå èñïîëüçîâàòü sleep mode íà ïîä÷èíåííîì, òîãäà íóæíî èñïîëüçîâàòü
in „SPI hängt beim Warten auf Ende der Übertragung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AT90USB1287_AVRS5.c
* * Created: 26.12.2011 20:55:11 * Author: Christian Balnuweit * Project: LFS-Projekt */ #include <avr/io.h> #include <avr/interrupt.h> #include <util/delay.h> #include "usb_serial.h" // Makros und Funktionsdeklaration #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) // siehe CLKPR-Register Doku void
in „Problem mit unterschiedlichen Prescalern“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
regler_sensor_lcd.c
/* * main.c * * Created: 11.03.2013 10:28:50 * Author: */ #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> #include <stdio.h> #include <stdlib.h> #include "UART.h" #include "1wire.h" #include "measure.h" #include "hardware.h" #include "lcd.h" /*REGLER
in „LCD Display funktioniert bei Zusammenstellung nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Elektoronik.c
//Include & Define #include <avr/io.h> #include <avr/interrupt.h> #define F_CPU 6000000UL //Quarzansteuerung #include <util/delay.h> #define LED_RED (1<<PORTC1) //LED sind low aktiv (LOW um eingeschaltet zu sein) #define LED_GREEN
in „ATmega8 ADC-Durchschnittsberechnung“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
vwcdc.c
*******/ /* -- Includes ------------------------------------------------------------- */ #include <avr/io.h> #include <avr/sfr_defs.h> #include <stdlib.h> #include <avr/interrupt.h> #include <avr/pgmspace.h> #include <util/delay.h> #include "main.h" #include "uart.h" /* -- Configuration Parameters --
in „CD Wechsler Protokoll“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
SHT_TEST.c
114, 33, 16, 135, 182, 229, 212, 250, 203, 152, 169, 62, 15, 92, 109, 134, 183, 228, 213, 66, 115, 32, 17, 63, 14, 93, 108, 251, 202, 153, 168, 197, 244, 167, 150, 1, 48, 99, 82, 124, 77, 30, 47, 184, 137, 218, 235, 61, 12, 95, 110, 249, 200, 155, 170, 132, 181, 230, 215, 64, 113, 34, 19, 126, 79, 28
in „SHT11 an ATmega2560 Es funktioniert nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
port.c
********************************************************************** */ /* Changes from V2.6.0 + AVR port - Replaced the inb() and outb() functions with direct memory access. This allows the port to be built with the 20050414 build of WinAVR. */ #include <stdlib.h> #include <avr/interrupt.h> #include
in „Schreiben in SRAM per pointer“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
port.c
Commercial support, development, porting, licensing and training services. */ /* Changes from V2.6.0 + AVR port - Replaced the inb() and outb() functions with direct memory access. This allows the port to be built with the 20050414 build of WinAVR. */ #include <stdlib.h> #include <avr/interrupt.h> #include
in „Multitasking mit AVR“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
Stamp_Doku.pdf
schaltungsvariante auch die 3.3V Versorgung über den internen Regler. Seit3 Retrocomputing Hardwareversion 1.1 AVR-Stamp V1.1 Das AVR-Stamp Modul - Version 1.1 kann mit 3.3V oder mit 5V betrieben werden. ACHTUNG eine Mischbestückung AVR (3.3V) und Z180 (5V) oder umgekehrt ist nicht zulässig! Die 3.3V Ver- sorgungsspannung
in „Z180-Stamp Modul“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
Stamp_Doku.pdf
schaltungsvariante auch die 3.3V Versorgung über den internen Regler. Seit3 Retrocomputing Hardwareversion 1.1 AVR-Stamp V1.1 Das AVR-Stamp Modul - Version 1.1 kann mit 3.3V oder mit 5V betrieben werden. ACHTUNG eine Mischbestückung AVR (3.3V) und Z180 (5V) oder umgekehrt ist nicht zulässig! Die 3.3V Ver- sorgungsspannung
in „Entwicklerboards für Benchmarks - Z80 und Verwandte“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
avrdudelog.txt
avrdude: Recv: . [01] . [00] . [0a] A [41] V [56] R [52] I [49] S [53] P [50] _ [5f] M [4d] K [4b] 2 [32] avrdude: stk500v2_getsync(): found AVRISP mkII programmer AVR Part : ATMEGA16 Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PA0 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------
in „ISPmk2 erkennt keine Chips mehr“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Tiny25_fast_PWM.c
/* * Tiny25 fastPWM.c * * Created: 29.11.2015 17:32:47 * Author: Joerg */ #define F_CPU 1000000 #include <avr/io.h> #include <util/delay.h> #define INPUT( Port, Bit ) ( !((Port) & ( 1 << (Bit) )) ) #define IN_1 PB2 // Input 1 #define IN_2 PB3 // Input
in „Fast-PWM Frequenz mit 100Hz“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
code.c
// Einbinden der erforderlichen Bibliotheken #include <avr/io.h> // Atmega32 Register #include <util/delay.h> // Verzögerungs Routinen #include <i2cmaster.h> // I2C Master Library #include <stdlib.h> // Sonstige Funktionen #include <math.h> // Mathematische
in „String an LCD ausgeben“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main_-_Kopie.c
#define F_CPU 1000000 // int.Takt auf 1MHz gestellt #include <avr/io.h> #include <util/delay.h> // Präprozessor Makros #define OBER_BEREICH (int16_t)(11.8*1024/15) // oberen Spg-Schwellwert definieren, Formel: OW.MBg*AL/MBg, wird vom Compiler nur ein mal berechnet
in „while( ) >>> mit Bedingungen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
RP6RobotBaseLib.h
MC_IDLE 0 #define MC_MOVEDIST_R 1 #define MC_MOVEDIST_L 2 #define MC_ROTATE 4 #define MC_CHANGE_DIR_R 32 #define MC_CHANGE_DIR_L 64 void setMotorDir(uint8_t left_dir, uint8_t right_dir); /** * These Macros return the current direction value. * They return true if direction is Forwards, false otherwise.
in „PIC < > AVR (mit IIC)“ · Mikrocontroller und Digitale Elektronik ·
-
PDF
SAMA5D2_PTC_Firmware_UG.pdf
4, 8, 16, 32 and 64. This is a digital averaging of the ADC output code. It is the same operation performed by the digital gain accumulator; this is why the PTC Filter Level parameter needs to be bigger than or equal
in „Was ist bzw. war Atmel QTouch?“ · Mikrocontroller und Digitale Elektronik ·
-
Bild
Datenblatt Ausschnitt AVR128DB Package Marking Information
information. © 2023 Microchip Technology Inc. and its subsidiaries Complete Data Sheet DS40002247B-page 685 AVR128DB28/32/48/64 Package Drawings 42.2.1 28-Pin SPDIP Figure 42-1. General XXXXXXXXXX e3 Y YWWNNN Figure 42-2. Example AVR128DB e3 2040NNN 42.2.2 28-Pin SOIC
in „AVR128DA64 TCA1 funktioniert nicht mit alternativen Output?“ · Mikrocontroller und Digitale Elektronik · · Screenshots
-
Datei
TMC222_AVR.h
************************************************* Example library for using a TMC222 together with AVR processors that have a hardware TWI interface (e.g. ATmega8, ATmega48, ATmega88, ATmega168, ATmega16, ATmega32, ATmega64, ATmega128, AT90CAN128 and many more). It implements and interrupt driven TWI master communication over the TWI of the AVR MCU and utilizes this for communication with the TMC222. Routines for all TMC222 commands are provided to make it easy to use the TMC222. It has been developed using the AVR GCC (WinARM distribution
in „Ansteuerung TMC222“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
ATmega328P, aka Arduino Uno/Micro/Nano */ #define F_CPU 16000000UL #include <stdbool.h> #include <avr/io.h> #include <avr/interrupt.h> #include <avr/sleep.h> #include <util/delay.h> #define ADC_CHANNELS 3 #define ADC_AVERAGE_CNT 4 #define ADC_PRESCALER 16 volatile uint16_t adc_avg[ADC_CHANNELS]; volatile
in „ADC-Kanäle sukzessive abfragen“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
uart.c
UCSRA #define UART0_CONTROL UCSRB #define UART0_DATA UDR #define UART0_UDRIE UDRIE #elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__) \ || defined(__AVR_ATmega8515__) || defined(__AVR_ATmega8535__) \ || defined(__AVR_ATmega323__) /* ATMega with one USART */ #define
in „UART im AVR Studio simulieren“ · Mikrocontroller und Digitale Elektronik ·
-
Bild
Bestückte Leiterplatte mit Atmel Mikrocontroller
U4 C8 FB1 R1 U1 R15 R14 C5 C6 D1 D2 R9 R10 R5 3V3 U5 C10 C11 C22 J2 R12 R11 R13 RX0 J3 PIC1-2 AVR=2-3 1 2 3 J3 ACTIVE STATUS C19 R18 R17 D31 R25 C25 R29 C26 U3 GND R68 R66 R60 C33 R63 R65 R64 R43 R42 R39 R38 R37 R36 R35 R34 R33 R32 R31 R30 R29 R28 R27 R26 R25 R24 R23 R22 R21 R20 R19 R16 R15 R14
in „[V] Microchip Snap (neue Version) mit Atmel Adapter“ · Markt · · Platinenfotos
-
Datei
HeizgV20.c
************************************************************************** Project : Heizung ATmega32 Version : V2.0 Date : 15.09.2010 ATMEGA32 Compiler: WIN-AVR Status des Programms: 29.11.2006 Fehler im Taktgenerator (Uhr ging falsch) 15.07.2009 umgeschrieben auf Win_avr Compiler Fleury's LCD und UART
in „Heizungssteuerung mit ATMEGA 32“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AD7193.c
programmable * gain amplifier (PGA). You can choose on of four gain factors: * - 1 * - 8 * - 16 * - 32 * - 64 * - 128 * * Since the AD7193 is especially designer for bridge sensor applications the * gain factors of 64 and 128 are often used and mostly meet requirements. If * you don't want to use the
in „Merkwürdige Registerinhalte beim ADC AD7193“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
// // Steuerung und Anzeigeeinheit Netzteil 10V; max 10A Linearregler // ATMEGA 32 - DIP40 // #define F_CPU 25000000 //25MHZ Quarz mit 22pF gegen Masse #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> #include <lcd.c> #include <stdlib.h> #define Reg_proportional
in „ATMEGA 32 mit LCD - Probleme mit Interrupt INT0“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
mmb.c
mmbStiefel_Tester_v1.c * * Created: 24.06.2014 08:30:13 * Author: APfaeffle */ #define F_CPU 8000000UL #include <avr/io.h> #include <avr/interrupt.h> #include <util/delay.h> #include <stdint.h> #include <stdbool.h> #include <string.h> #include "lcd-routines.h" //#define LED_RD (PORTB |= 1<<PB0) //#define LED_GR (PORTB
in „Problem mit ATmega164A und LCD FDCC1601E“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
hsb2rgb.asm
;HSB nach RGB Umrechnung (für LEDS) rein in AVR-Assembler, ziemlich simpel ;Der Code ist hier zwar für AVR geschrieben, ist aber derart simpel, dass er auf jeden Controller ;ohne grossen Aufwand portiert werden kann. Es bedarf keinerlei Spezialbefehle
in „Fertig: HSB->RGB Umrechnung rein in Assembler, auch für ATiny“ · Projekte & Code ·
-
Datei
tester2.asm
abhängigkeit der adr**************** ds18_wm:rcall ds_reset rcall skip_rom ;rcall match_rom rcall s1_64bit rcall convert_t rcall ds_reset rcall skip_rom ;rcall match_rom rcall s1_64bit rcall read_scratchpad rcall ausgabe3 ret ;************************Th und Tl write****************************** ds18_thl
in „ds1820 befehle“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AVR_T_DS18S20.cpp
//////////////////////////////////////////////////////////////// // // Time-stamp: "25.12.09 22:59 AVR_T_DS18S20.cpp klaus?wachtler.de" // //////////////////////////////////////////////////////////////////////////////// // // Beispiel für Anschluß Temperatursensor DS18S20 (1-wire) an ATMega32 // // Zudem
in „DS18S20 Temperatur auslesen mit C geht nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
AD7193.c
programmable * gain amplifier (PGA). You can choose on of four gain factors: * - 1 * - 8 * - 16 * - 32 * - 64 * - 128 * * Since the AD7193 is especially designer for bridge sensor applications the * gain factors of 64 and 128 are often used and mostly meet requirements. If * you don't want to use the
in „Merkwürdige Registerinhalte beim ADC AD7193“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
PWM.c
#endif #define true 1 #define false 0 #define STK500 false #include <avr/io.h> // Namen der IO Register #include <util/delay.h> // Funktionen zum warten #include <avr/interrupt.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <inttypes.h> //globale Variable für die PWM uint16_t pwmTable_8[] = {0, 4, 8, 16, 32, 64, 128, 255}; #define ARRAY_SIZE(x) (sizeof(x)/sizeof(*x)) //----------------- long delays void my_delay(uint16_t milliseconds) { for(; milliseconds > 0; milliseconds--) _delay_ms(1); } //---------
in „Probleme mit der Verbindung PWM + ADC“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
usb_hdi.h
Everything below this point is only intended for usb_serial.c #ifdef USB_SERIAL_PRIVATE_INCLUDE #include <avr/io.h> #include <avr/pgmspace.h> #include <avr/interrupt.h> #define EP_TYPE_CONTROL 0x00 #define EP_TYPE_BULK_IN 0x81 #define EP_TYPE_BULK_OUT 0x80 #define EP_TYPE_INTERRUPT_IN 0xC1 #define EP_TYPE_INTERRUPT_OUT
in „Teensy HDI läuft nicht richtig“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
testHardware.lst
: 45 .LBE15: 46 .LBE14: 47 .LM5: 48 0006 4098 cbi 40-32,0 49 .LBB21: 50 .LBB20: 51 .LBB19: 52 .LBB18: 53 .LM6: 54 0008 C901 movw r24,r18 55 .LVL0: 56 /* #APP */ 57 ; 105 "c:/winavr-20100110/lib/gcc/../../avr/include/util/delay_basic.h" 1 58 000a 0197 1: sbiw r24,1 59 000c 01F4 brne 1b 60 ; 0 "" 2 61 /* #NOAPP */ 62 .LBE18: 63 .LBE19: 64 .LBE20: 65 .LBE21: 66 .LM7: 67 000e 409A sbi 40-32,0 68 0010 00C0 rjmp .L4 69 .LFE7: 103 .Letext0: DEFINED SYMBOLS *ABS*:00000000 testHardware.c C:\DOKUME~1\HJ589E~1.DRE\LOKALE~1\Temp/ccCiTwWg.s:2 *ABS
in „Auswahl der Hardware durch Präprozessor“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
/* * Ruderlampe.c * * Created: 16.11.2016 13:22:52 * Author : Julian */ #include <avr/io.h> #include <util/delay.h> #include "adc.h" #include <stdint.h> #include <avr/sleep.h> #include <avr/interrupt.h> #include <avr/eeprom.h> #define DDR_RED DDRB #define PORT_RED PORTB #define PIN_RED
in „int16 wird bei Addition kleiner“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
lcd.h
auszugeben * * LCD_initialisierung um das LCD zu initialisieren * * * * * *8-Bit Datenbus * * * * LCD_Atmega32___V_1.c * * * * Created: 11.10.2012 22:02:25 * * Author: Sandro * **********************************************************************************************************************/ #ifndef lcd /
in „LCD spricht nicht an bei 8MHz“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
test.lst
test.out: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .text 000000cc 00000000 00000000 00000094 2**0 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000000 00800060 000000cc 00000160 2**0 CONTENTS, ALLOC
in „WINAVR mag keinen Vergleich mit 1“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
crc16.c
#include <avr/io.h> // CRC16 CCITT X^16 x^12 + x^5 + 1 static uint16_t crc_table [256] = { 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef
in „Floppy MFM Decoder selber bauen AVR ATmega Assembler Beispiele FDD Diskette“ · Projekte & Code ·
-
Datei
log-ausgabe.txt
avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e5206 (probably 8052) avrdude: NOTE: "flash
in „AT89S52 programmieren klappt nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Blackstorm_Atmega8_2.bas
**************************************** ' Original übernommen von http://blackstrom.derschwarz.de/avr/avr_uhr/index.shtml ' Wolfgang Schwarz ' Modifiziert für Atmega8 und 1Mhz Quarz '******************************************************************************* ' µC Deklarationen $regfile = "m8def.dat
in „Attiny13 Schalter“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
Temp.asm
block ;---------------------------------- ;...T0/16/256==T0/4096...426ms: ; TST Rtxbytes ; BRNE L_T0d64X DEC RT0dv64 BRNE L_T0d64X LDI Rwk1,255 ;60? MOV RT0dv64,Rwk1 SBRC R2flg,TXcancel ;TX blocked by RX ?? RJMP L_T0d64X ;MessDatenPaket an PC senden: LDI Rwk1,16 MOV Rtxbytes,Rwk1 L_T0d64X: ; ;---------
in „Tiny26 Programm ändern in Programm für Mega8“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
filemon-winavr-20070122.log.txt
SUCCESS Offset: 78848 Length: 4096 31 19:36:27 Avr-gcc:FFE5AB77 Write C:\WINDOWS\APPLOG\AVR-GCC.~~D SUCCESS Offset: 321 Length: 23 32 19:36:27 Avr-gcc:FFE5AB77 Read D:\WINAVR\BIN\AVR-GCC.EXE SUCCESS Offset: 103936 Length: 4096 33 19:36:27 Avr-gcc:FFE5AB77
in „avr-gcc: _spawnv: No such file or directory“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
TimerRegs.h
#include <ioreg.h> // IO_REG_WRAPPERT #include <bitmask_.h> // enable bitmask operations #include <AVR/Avr8/Avr8_.h> // #include <AVR/base/Clock_.h> // adj.osc|sys clock div|delay //#include <AVR/base/TimerC_.h> // Timer0 // include file after TimerRegs //#include <AVR/base/TimerI_.h> // Timer1 // include
in „struct Name mittels define erstellen - gcc“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
PWM_ADC.txt
F_CPU #define F_CPU 800000UL #endif #define true 1 #define false 0 #define STK500 false #include <avr/io.h> // Namen der IO Register #include <util/delay.h> // Funktionen zum warten #include <avr/interrupt.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <inttypes.h> #include <avr/pgmspace.h> // globale Variable uint16_t pwmtable_8B[8] PROGMEM = {0, 4, 8, 16, 32, 64, 128, 255}; // ADC initialisieren /----------------------------------------------------------------------------
in „Probleme mit der Verbindung PWM + ADC“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
16000000UL #include <stdint.h> // Header File für Datentypen (uint8_t, etc.) #include <stdlib.h> #include <avr/io.h> // Header File für IO Ports #include <avr/interrupt.h> // Header File Interrupt Vektoren #include <avr/pgmspace.h> // Markos für PGM Space // INCLUDES für UART #include "uart.h" #define ANZAHL1
in „µC rechnet falsch oder ich finde den Fehler nicht“ · Mikrocontroller und Digitale Elektronik ·
-
Datei
main.c
PORTB |= (1 << PB4); /* SPI enable, Master-Mode, MSB zuerst, SCK low im idle, rising edge, fosc / 64 -> 125 kHz*/ SPCR |= ((1 << SPE)|(1 << MSTR)|(0 << DORD)|(0 << CPOL)|(0 << CPHA)|(1 << SPR1)); } void SPI_MasterTransmit(uint32_t cData){ union // Union mit vier 8 Bit-Arrays anlegen { uint8_t bytes[4]; uint32_t regValue; }deviceRegister; deviceRegister.regValue = cData; // 32 Bit Registerwert übergeben PORTB &= ~(1 << PB4); // LE_PLL auf low ziehen, Übertragung vorbereiten for(int i = 0; i < 4 ;i++) // Vier