Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
content
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Gerner
content
Commits
2d6ba1e0
Commit
2d6ba1e0
authored
13 years ago
by
Michal Rybka
Browse files
Options
Downloads
Patches
Plain Diff
Přidán článek AVR - LCD panel - lcd.c
(Autoexportován z Joomly)
parent
1b5451a2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
articles/2012/avr-lcd-panel-lcdc.md
+89
-0
89 additions, 0 deletions
articles/2012/avr-lcd-panel-lcdc.md
with
89 additions
and
0 deletions
articles/2012/avr-lcd-panel-lcdc.md
0 → 100644
+
89
−
0
View file @
2d6ba1e0
+++
title = "AVR - LCD panel - lcd.c"
perex_e = "
Kompatibilní zapojení: LCD panel s ATmega8
Ke stažení: lcd.c == lcd.pdf == lcd.htm
.
.
"
tags = ["Článek"]
+++
Kompatibilní zapojení: LCD panel s ATmega8
Ke stažení: lcd.c == lcd.pdf == lcd.htm
.
.
* * *
<title>
Untitled
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
name=
"generator"
content=
"SynEdit HTML exporter"
>
<style
type=
"text/css"
>
&
amp
;
amp
;
amp
;
amp
;
amp
;
lt
;
!-- body { color: #000000; background-color: #FFFFFF; } .cpp1-assembler { } .cpp1-brackets { } .cpp1-comment { color: #008000; font-style: italic; } .cpp1-float { color: #000080; } .cpp1-hexadecimal { color: #000080; } .cpp1-character { } .cpp1-identifier { } .cpp1-illegalchar { } .cpp1-number { color: #000080; } .cpp1-octal { color: #0000FF; } .cpp1-preprocessor { } .cpp1-reservedword { font-weight: bold; } .cpp1-space { color: #008080; } .cpp1-string { color: #800000; } .cpp1-symbol { } --
&
amp
;
amp
;
amp
;
amp
;
amp
;
gt
;
</style>
```
/*---------------------------------------------------------------------------
soubor: lcd.c
verze: 1.0
datum: 13.1.2012
popis:
Obsluzne rutiny pro displej 2x16 znaku s radicem HD44780
-Komunikace je ctyrbitova (pouzivaji se pouze piny displeje D4 - D7)
-Displej je v rezimu "pouze zapis" (signal "R/W" displeje je uzemen)
-Displej je pripojen k mikrokontroleru pouze signaly: RS, EN a D4 az D7.
Tento soubor vynikl upravou souboru "mojelib.h" jehoz autora bohuzel neznam.
---------------------------------------------------------------------------*/
#include <avr/pgmspace.h> // pgm_read_byte()
#ifndef setb //setb = makro ze souboru "wait.c"
#include "wait.c"
#endif
//Defaultni definice pinu, ke kterym je displej pripojen
#ifndef PORT_RS
#define PORT_RS PORTD
#define DDR_RS DDRD
#endif
#ifndef PORT_EN
#define PORT_EN PORTD
#define DDR_EN DDRD
#endif
#ifndef PORT_D4
#define PORT_D4 PORTD
#define PORT_D5 PORTD
#define PORT_D6 PORTD
#define PORT_D7 PORTD
#define DDR_D4 DDRD
#define DDR_D5 DDRD
#define DDR_D6 DDRD
#define DDR_D7 DDRD
#endif
#ifndef RS
#define RS 2
#endif
#ifndef EN
#define EN 3
#endif
#ifndef D4
#define D4 4
#define D5 5
#define D6 6
#define D7 7
#endif
// Funkce pro displej:
void lcd_ini (void); //inicializace
void lcd_instr(unsigned char ins); //napis instrukci
void lcd_char (unsigned char dat); //napis znak
void lcd_num3 (unsigned int num,unsigned char znak); //napis cislo (3 cifry)
void lcd_num2 (unsigned char num,unsigned char znak);//napis cislo (2 cifry)
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment