-
Notifications
You must be signed in to change notification settings - Fork 0
/
TRC_SND.c
52 lines (39 loc) · 1.03 KB
/
TRC_SND.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*****************************************************
Project : TRC101 Ïåðåäàò÷èê
Date :
Author : Ê. Ãóðàøêèí
Chip type : ATmega16
Clock frequency : 4,000000 MHz
*****************************************************/
#include <mega16.h>
#include <delay.h>
#include <trc.h>
#define LEDDDR DDRA
#define LEDPIN 0
#define LEDOFF() PORTA |= (1<<(0))
#define LEDON() PORTA &= ~(1<<(0))
void main(void)
{
char cString1[]= "-= DieHard =-";
char cString2[]= "- BoogieMan -";
char cString3[]= "TheIceFantasy";
char i=0;
LEDDDR = (1<<LEDPIN);
LEDON();
TrcPortInit();
TrcInitSnd();
LEDOFF();
delay_ms(1000);
while (1)
{
for(i=0;i<3;i++)
{
LEDON();
if(i==0) TrcSendPocket(cString1, 13); // Îòïðàâèòü ïàêåò áàéò
if(i==1) TrcSendPocket(cString2, 13); // Îòïðàâèòü ïàêåò áàéò
if(i==2) TrcSendPocket(cString3, 13); // Îòïðàâèòü ïàêåò áàéò
LEDOFF();
delay_ms(4000);
}
};
}