This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Test mikrokontrolera ATmega48P | |
' - zapalające się kolejno diody LED... | |
$regfile = "m48pdef.dat" | |
$Crystal=4000000 | |
$hwstack=40 | |
$swstack=16 | |
$framesize=32 | |
Config Timer1 = Timer , Prescale = 64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* main.c | |
* | |
* Created on: 2012-11-29 | |
* Author: Rafał Wileczek | |
*/ | |
#include <avr/io.h> | |
#include <util/delay.h> | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Test UART - nadajnik (ATmega48P + ULN2803 + 3*LED) | |
$regfile = "m48pdef.dat" | |
$crystal = 4000000 | |
$baud = 9600 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
$eeprom | |
Alfabet: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <PID_v1.h> | |
//#define TEMP_ZADANA 41 // odpowiednik 20 stopni | |
//#define TEMP_ZADANA 68 // odpowiednik 33 stopni | |
#define TEMP_ZADANA 52 // odpowiednik 25 stopni | |
#define TERMOMETR_PIN 0 | |
#define WENTYLATOR_PIN 3 // PWM | |
#define Kp 20 | |
#define Ki 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$regfile = "attiny2313.dat" | |
$crystal = 4000000 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
Dim Sekundy As Byte | |
Dim Minuty As Byte | |
Dim Godziny As Byte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$regfile = "attiny2313.dat" | |
$crystal = 4000000 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
Dim Sekundy As Byte | |
Dim Minuty As Byte | |
Dim Godziny As Byte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Stałe używane przez sterownik | |
Const Clean = 255 | |
Const Cleft = 254 | |
Const Cright = 253 | |
Const Con = 252 | |
Const Coff = 251 | |
Const Cblink = 250 | |
Const Cnoblink = 249 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Zegar czasu rzeczywistego z wyświetlaczem LED 7-segm. | |
' - wersja prymitywna | |
$regfile = "attiny2313.dat" | |
$Crystal=4000000 | |
$hwstack=40 | |
$swstack=16 | |
$framesize=32 | |
'Config Timer1 = Timer , Prescale = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Demonstracja modulacji szerokości impulsu (PWM) i wbudowanego | |
' przetwornika analogowo-cyfrowego MCU ATmega48P | |
$regfile = "m48pdef.dat" | |
$crystal = 4000000 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
' Plik z definicjami stałych używanych do sterowania modułem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Prosty termometr, wykorzystujący wbudowany czujnik temperatury | |
' mikrokontrolera ATmega48P | |
$regfile = "m48pdef.dat" | |
$crystal = 4000000 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
' Plik z definicjami stałych używanych do sterowania modułem |