뉴티씨



  • HOME
  • 고객지원
  • 질문답변

 

 
se-hearts와 se-511 잘사용하고 있습니다만..
 글쓴이 : 김재영
작성일 : 05-10-22 14:27
조회 : 8,267  

안녕하세요.

관리자님 홈피에있는자료(1)/(hearts.c)를 컴파일링 하면 아래(2)와같이 Hex화일이 생성 됩니다..

se-heart-s에 있는 at89c2051를 리딩하면 (3)번 자료와같이같습니다..
se-hearts에있는 칩데이터처럼 변환안되고 생성된 데이터로는 작동불이네여~.
참고로 셋팅관계를 캡쳐하여 오립니다.셑팅관계가잘못되었는지요?

=============================================================================(1)

// 8051 Initial C Source File
#include <sfr.h>
//
_sfrbit P37 = _p3^7; 
//_sfrbit P36 = _p3^6;
_sfrbit P35 = _p3^5;
_sfrbit P34 = _p3^4;
_sfrbit P33 = _p3^3;
_sfrbit P32 = _p3^2;
_sfrbit P31 = _p3^1;
_sfrbit P30 = _p3^0;

_sfrbit P17 = _p1^7;
_sfrbit P16 = _p1^6;
_sfrbit P15 = _p1^5;
_sfrbit P14 = _p1^4;
_sfrbit P13 = _p1^3;
_sfrbit P12 = _p1^2;
_sfrbit P11 = _p1^1;
_sfrbit P10 = _p1^0;
//
//
//||A| | |C||D| | |F||G||A| | |C||D| | |F||G||A| | |C||D| | |F||G||A| | |C||D| |
//||2| | |3||3| | |3||3||3| | |4||4| | |4||4||4| | |5||5| | |5||5||5| | |6||6| |
//||#| | |#||#| | |#||#||#| | |#||#| | |#||#||#| | |#||#| | |#||#||#| | |#||#| |
//  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
//A2|B2|C3|D3|E3|F3|G3|A3|B3|C4|D4|E4|F4|G4|A4|B4|C5|D5|E5|F5|G5|A5|B5|C6|D6|E6|
//--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
//
//
//                                          '  Freq.Hz| Cycle mS| Real Freq
//-----------------------------------------------------------------------------------
#define A2  204                          //  110.000| 9.0909    110
#define A2s  192                          //  116.541| 8.6643    116
#define B2  181                          //  123.471| 8.0990    123
//-----------------------------------------------------------------------------------
#define C3  171                          //  130.818| 7.6445    130
#define C3s  160                          //  138.591| 7.2154    138
#define D3  150                          //  146.832| 6.8105    146
#define D3s  140                          //  155.561| 6.0217    155
#define E3  132                          //  164.814| 6.0217    165
#define F3  123                          //  174.614| 5.7269    175
#define F3s  115                          //  184.997| 5.4054    185
#define G3  108                          //  195.998| 5.1020    196
#define G3s  101                          //  207.652| 4.8157    207
#define A3  94                            //  220.000| 4.5454    221
#define A3s  88                            //  233.082| 4.3321    234
#define B3  82                            //  246.942| 4.0495    248
//-----------------------------------------------------------------------------------
#define C4  77                            //  261.626| 3.8222    261
#define C4s  72                            //  277.183| 3.6077    276
#define D4  67                            //  293.665| 3.4052    293
#define D4s  62                            //  311.122| 3.0108    312
#define E4  57                            //  329.612| 2.8634    333
#define F4  53                            //  349.228| 2.7027    353
#define F4s  48                            //  369.994| 2.7027    374
#define G4  45                            //  391.995| 2.5510    399
#define G4s  42                            //  415.305| 2.4078    415
#define A4  39                            //  440.000| 2.2727    443
#define A4s  36                            //  466.164| 2.1660    469
#define B4  33                            //  493.883| 2.0247    498
//-----------------------------------------------------------------------------------
#define C5  31                            //  523.251| 1.9111    519
#define C5s  28                            //  554.365| 1.8038    554
#define D5  26                            //  587.330| 1.7026    581
#define D5s  23                            //  622.254| 1.6070    626
#define E5  21                            //  659.255| 1.5054    660
#define F5  19                            //  698.456| 1.4317    698
#define F5s  17                            //  739.989| 1.3513    742
#define G5  15                            //  783.991| 1.2755    789
#define G5s  14                            //  830.609| 1.2039    816
#define A5  12                            //  880.000| 1.1363    875
#define A5s  11                            //  923.328| 1.0830    908
#define B5  9                            //  987.767| 1.0123    981
//-----------------------------------------------------------------------------------
#define C6  7                            // 1046.502| 0.9555    1067
#define C6s  6                            // 1108.731| 0.9019    1116
#define D6  5                            // 1174.659| 0.8513    1171
#define D6s  4                            // 1244.508| 0.8035    1230
#define E6  2                            // 1328.510| 0.7527    1295
//-----------------------------------------------------------------------------------

unsigned int noteon;
unsigned char step;

void delay(unsigned i) {
unsigned long j;
unsigned long k;

  k = i * 1000;

  for (j=0; j < k; j++) ;

}

void led_blink(void) {

  if (step == 0) {
    P32 = 0;
  }
  if (step == 1) {
    P31 = 0;
  }
  if (step == 2) {
    P30 = 0;
  }
  if (step == 3) {
    P17 = 0;
  }
  if (step == 4) {
    P16 = 0;
  }
  if (step == 5) {
    P15 = 0;
  }
  if (step == 6) {
    P14 = 0;
  }
  if (step == 7) {
    P13 = 0;
  }
  if (step == 8) {
    P12 = 0;
  }
  if (step == 9) {
    P11 = 0;
  }
  if (step == 10) {
    P10 = 0;
  }
  if (step == 11) {
    P35 = 0;
  }
  if (step == 12) {
    P34 = 0;
  }
  if (step == 13) {
    P33 = 0;
  }
  if (step == 14) {
    ;
  }
  if (step == 15) {
    _p1 = 0xFF;
    _p3 = 0xFF;
  }
  if (step == 16) {
    _p1 = 0x0;
    _p3 = 0x0;
  }
  if (step == 17) {
    ;
  }
  if (step == 18) {
    _p1 = 0xFF;
    _p3 = 0xFF;
  }
  if (step == 19) {
    _p1 = 0x0;
    _p3 = 0x0;
  }
  if (step == 20) {
    ;
  }
  if (step == 21) {
    _p1 = 0xFF;
    _p3 = 0xFF;
  }

  if (step >= 22) {
    step = 0;
  } else {
      step++;
    }
}


void sound( unsigned char c ) {

 unsigned int k;
 unsigned int s;
 unsigned int m;
 unsigned int t;
 
 s = c * 2 + 30;
 t = 500 * noteon / s;

 for (m = 0; m < t; m++) {
    P37 = 1; for (k = 0; k < s; k++);
    P37 = 0; for (k = 0; k < s; k++);
 }
 led_blink();
 delay(1);

}

void sarang(void) {
  noteon = 25;
  sound(C5);              // 당
  sound(D5);              // 신
  noteon = 100;

  sound(E5);              // 은
  noteon = 25;

  sound(G5);              // 사
  sound(G5);                  // 랑
  noteon = 50;
  sound(G5);                  // 받
  sound(F5);                  // 기
  sound(E5);                  // 위
  sound(F5);              // 해
  noteon = 50;

  sound(E5);                  // 태
  sound(D5);                  // 어
  sound(C5);                  // 난
  noteon = 25;
  sound(B4);                  // 사
  noteon = 100;
  sound(C5);                  // 람

  noteon = 25;
  sound(A4);                  // 당
  sound(B4);                  // 신
  noteon = 50;
  sound(C5);                  // 의
  sound(C5);                  // 꿈
  sound(C5);                  // 속
  noteon = 25;
  sound(F5);                  // 에

  noteon = 100;
  sound(E5);                  // 서

  noteon = 25;
 
  sound(C5);                  // 그
  sound(C5);                  // 사
  sound(C5);                  // 랑
  noteon = 50;
  sound(E5);                  // 받
  sound(D5);                  // 고
  sound(D5);                  // 있
  noteon = 25;
  sound(C5);                  // 지
  noteon = 100;
  sound(D5);                  // 요

  noteon = 25;
  sound(C5);              // 당
  sound(D5);              // 신
  noteon = 100;

  sound(E5);              // 은
  noteon = 25;

  sound(G5);              // 사
  sound(G5);                  // 랑
  noteon = 50;
  sound(G5);                  // 받
  sound(F5);                  // 기
  sound(E5);                  // 위
  sound(F5);                  // 해

  sound(E5);                  // 태
  sound(D5);                  // 어
  sound(C5);                  // 난
  noteon = 25;
  sound(B4);                  // 사
  noteon = 100;
  sound(C5);                  // 람
  noteon = 25;
  sound(A4);                  // 당
  sound(B4);                  // 신
  noteon = 50;
  sound(C5);                  // 의
  sound(C5);                  // 꿈
  sound(C5);                  // 속
  noteon = 25;
  sound(F5);                  // 에

  noteon = 100;
  sound(E5);                  // 서

  noteon = 25;
 
  sound(C5);                  // 큰
  sound(C5);                  // 사
  sound(C5);                  // 랑
  noteon = 50;
  sound(E5);                  // 받
  sound(D5);                  // 고
  sound(C5);                  // 있
  noteon = 25;
  sound(B4);                  // 지
  noteon = 100;
  sound(C5);                  // 요

  delay(800);

}

main() {

  step = 0;

  while(1) {
   
      sarang(); 

  }

}






===============(2)자료===============================================================================

:03000000020026D5
:03002300020003D5
:1000260075811A75087FC2D3C2D41200E312014F3C
:100036001200C51200A71200451202330200007416
:100046000070047400601E900000A883A9829000CE
:1000560000AA83AB82900000AC83AD82C3ED9B7097
:1000660028EC9A7024740070047400601B900000E1
:10007600AC83AD82900000C3ED95827005EC95834C
:100086006006E4F0A302007D2288838982E493A3BC
:10009600A883A9828A838B82F0A3AA83AB820200FB
:1000A600627400600D9000007900FAE493F7A309EA
:1000B600DAF9740060087800FAE4F608DAFC2274CB
:1000C60000600D9000007900FAE493F7A309DAF9CD
:1000D600740060087800FAE4F608DAFC227400601E
:1000E60035FB900000740075F008842420F87A0827
:1000F600E5F06007E6031AD5F0FBF6EB600D1BE4AE
:1001060093A3A2E0E613F6DAF28005E603DAFDF63B
:10011600087A08EB70E57400602EFB740075F00831
:10012600842420F87A08E5F06007E6031AD5F0FB88
:10013600F6EB60091BC3E613F6DAF68005E603DA8A
:10014600FDF6087A08EB70E9227400600D90000055
:100156007900FAE493F7A309DAF974036008780DD5
:07016600FAE4F608DAFC22BE
:10016D0031303338383931360050726F647563650C
:10017D0064206279207468652043726F73737761B0
:10018D007265204E6F6E2D436F6D6D657263696183
:10019D006C2044656D6F6E73747261746F72004381
:1001AD006F70797269676874202863292032303046
:1001BD00312043726F737377617265204173736F72
:0701CD0063696174657300B2
:1001D400C3E518940A7004E5199400700AE50F70D9
:1001E400FC75990D750F01E50F70FC851899750F55
:0801F4000185180985190A2292
:1001FC00750D00750E00750F00759850758BFD759B
:10020C008DFD438780758920758800D28ED2ACD243
:02021C00AF220F
:10000300C0D0C2D3D2D430980AC29885990D750E48
:0E001300018008309905C299750F00D0D032D7
:0E021E00E50E60FC750E00850D09E4F50A2260
:07022C00850E09E4F50A222A
:040233001201FC2296
:00000001FF

==============(3)자료======================================================================

:03000000020252A7
:10000300751119751200781E761F12047F781E76FB
:100013001A12047F751164751200781E7615120486
:100023007F751119751200781E760F12047F781EE2
:10003300760F12047F751132751200781E760F1237
:10004300047F781E761312047F781E761512047FC0
:10005300781E761312047F751132751200781E769E
:100063001512047F781E761A12047F781E761F12EB
:10007300047F751119751200781E762112047F759D
:100083001164751200781E761F12047F751119759D
:100093001200781E762712047F781E762112047FC1
:1000A300751132751200781E761F12047F781E7642
:1000B3001F12047F781E761F12047F7511197512A3
:1000C30000781E761312047F751164751200781E72
:1000D300761512047F751119751200781E761F129A
:1000E300047F781E761F12047F781E761F12047F0A
:1000F300751132751200781E761512047F781E76FC
:100103001A12047F781E761A12047F75111975125C
:1001130000781E761F12047F751164751200781E15
:10012300761A12047F751119751200781E761F1244
:10013300047F781E761A12047F7511647512007895
:100143001E761512047F751119751200781E760F2D
:1001530012047F781E760F12047F75113275120018
:10016300781E760F12047F781E761312047F781E92
:10017300761512047F781E761312047F781E761587
:1001830012047F781E761A12047F781E761F1204DB
:100193007F751119751200781E762112047F75116F
:1001A30064751200781E761F12047F75111975127B
:1001B30000781E762712047F781E762112047F753D
:1001C3001132751200781E761F12047F781E761F77
:1001D30012047F781E761F12047F751119751200A1
:1001E300781E761312047F751164751200781E76DB
:1001F3001512047F751119751200781E761F1204EB
:100203007F781E761F12047F781E761F12047F7577
:100213001132751200781E761512047F781E761A35
:1002230012047F781E761F12047F75111975120050
:10023300781E762112047F751164751200781E767C
:0F0243001F12047F7814762008760312061D22FE
:1002520075812775107FC2D3C2D412030F12037B9C
:100262001202F11202D31202711206F60200007497
:100272000070047400601E900000A883A9829000A0
:1002820000AA83AB82900000AC83AD82C3ED9B7069
:1002920028EC9A7024740070047400601B900000B3
:1002A200AC83AD82900000C3ED95827005EC95831E
:1002B2006006E4F0A30202A92288838982E493A360
:1002C200A883A9828A838B82F0A3AA83AB820202CB
:1002D2008E7400600D9000007900FAE493F7A30990
:1002E200DAF9740060087800FAE4F608DAFC22749D
:1002F20000600D9000007900FAE493F7A309DAF99F
:10030200740060087800FAE4F608DAFC22740060EF
:1003120035FB900000740075F008842420F87A08F8
:10032200E5F06007E6031AD5F0FBF6EB600D1BE47F
:1003320093A3A2E0E613F6DAF28005E603DAFDF60D
:10034200087A08EB70E57400602EFB740075F00803
:10035200842420F87A08E5F06007E6031AD5F0FB5A
:10036200F6EB60091BC3E613F6DAF68005E603DA5C
:10037200FDF6087A08EB70E9227400600D90000027
:100382007900FAE493F7A309DAF9740360087811A3
:07039200FAE4F608DAFC2290
:10039900E5137002C2B2E513C394017002C2B1E55C
:1003A90013C394027002C2B0E513C394037002C26E
:1003B90097E513C394047002C296E513C3940570BC
:1003C90002C295E513C394067002C294E513C3945F
:1003D900077002C293E513C394087002C292E51331
:1003E900C394097002C291E513C3940A7002C290C2
:1003F900E513C3940B7002C2B5E513C3940C7002E4
:10040900C2B4E513C3940D7002C2B3E513C3940ECD
:100419006000E513C3940F70067590FF75B0FFE592
:1004290013C39410700675900075B000E513C3945A
:10043900116000E513C3941270067590FF75B0FF43
:10044900E513C39413700675900075B000E513C3E6
:1004590094146000E513C3941570067590FF75B088
:10046900FFE513C3941630D204B2E7D2E040047515
:060479001300220513220E
:10047F00851E08E4F509E508C333F508E50933F5EA
:10048F0009E508241EF508E5093400F5098508215A
:10049F008509227508F475090185110C85120D78EF
:1004AF0008790C1205BE85210C85220D7809790D6E
:1004BF0012055285082585092675230075240085A8
:1004CF002508852609C3E5239508E524950930D22B
:1004DF0004B2E7D2E0505ED2B7751F0075200085D9
:1004EF002108852209C3E51F9508E520950930D21B
:1004FF0004B2E7D2E0500A051FE51F700205208005
:10050F00DEC2B7751F00752000852108852209C33B
:10051F00E51F9508E520950930D204B2E7D2E050E7
:10052F000A051FE51F7002052080DE0523E52370F5
:10053F00020524808A120399781476010876001236
:03054F00061D2264
:10055200C0E08BE0C0E08CE0C0E08FE0C0E0E719D3
:100562004770030205B2E4FBFC7F10E61820E71097
:10057200DF030205A6C3E633F608E633F61880ED7C
:10058200E633F608E633F618EC33FCEB33FBC3EC48
:1005920097C0E0EB09974006FBD0E0FC8002D0E078
:1005A20019B3DFDCECF709EBF7E633F608E633F6CE
:1005B200D0E0FFD0E0FCD0E0FBD0E022C0E0EAC017
:1005C200E0EBC0E0ECC0E0EFC0E0E6FC08E6FBE4F4
:1005D200F618F6EC7F0813500312060E120600DF1F
:1005E200F5EB7F0813500312060E120600DFF5D05A
:1005F200E0FFD0E0FCD0E0FBD0E0FAD0E022C0E0A7
:10060200C3E733F709E733F719D0E022C0E0E62762
:0B061200F60809E637F61819D0E022C0
:10061D00851408851509750CE8750D037808790C96
:10062D001205BEE4F50AF50B85081A85091B850A26
:10063D001C850B1D751600751700751800751900B2
:10064D00851A08851B09851C0A851D0B7816C3E6BE
:10065D00950808E6950908E6950A08E6950B30D247
:10066D0004B2E7D2E0501AE5162401F516E5173469
:10067D0000F517E5183400F518E5193400F5198063
:02068D00BF228A
:10068F0031303338383931360050726F64756365E5
:10069F0064206279207468652043726F7373776189
:1006AF007265204E6F6E2D436F6D6D65726369615C
:1006BF006C2044656D6F6E73747261746F7200435A
:1006CF006F7079726967687420286329203230301F
:1006DF00312043726F737377617265204173736F4B
:0706EF00636961746573008B
:0906F60075130012000380FB22C1
:00000001FF


 
   
 

 


1