Page 295 - 3-2
P. 295

16'h3733: tim <= 22;// 숭의
                    16'h3734: tim <= 25;// 인하대
                    16'h3735: tim <= 27;// 송대
                    16'h3736: tim <= 31;// 연수
                    16'h3737: tim <= 35;// 남동인더스파크
                    16'h3738: tim <= 37;// 호구포
                    16'h3739: tim <= 39;// 인천논현
                    default: tim <= 00;
                    endcase
            endmodule




            나 아두이노 소스.
            char incomingByte = 0;    //  수신 데이터를 저장하는 변수
            int latchPin = 9;
            int clockPin = 10;
            int dataPin = 8;
            int reset = 11;
            char bufferIndex = 0;
            unsigned int buff_buffer; //2byte
            byte buff[2];
            char a=0;




            byte u1=B00000000, u2=B00000000, u3=B00000000, u4=B00000000, u5=B00000000;
            byte u6=B00000000, u7=B00000000, u_8=B00000000, u9=B00000000, u10=B00000000;


            void setup() {
              pinMode(latchPin, OUTPUT);
              pinMode(clockPin, OUTPUT);
              pinMode(dataPin, OUTPUT);
              pinMode(reset, OUTPUT);
              Serial.begin(9600);
            }


            void loop() {


            //  시리얼 버퍼가 차있을 때만 읽어옴
                    if (Serial.available() > 0) {
                            //  읽어온 것을 변수에 저장
                            Serial.println(Serial.available());
                            incomingByte = Serial.read();


                            //  읽어온 것을 다시 시리얼을 통해 송신
                            Serial.println(incomingByte);


                                                         - 295 -
   290   291   292   293   294   295   296   297   298   299   300