Valid HTML 4.0!
Valid CSS!


 

NEC FM20X2AA-DA

Specificaties:

  • Merk: NEC
  • Type: FM20X2AA-DA
  • Display type: VFD
  • Resolutie: 2 regels x 20 tekens
  • Achtergrondverlichting: Geen
  • Aansturing: CPU Bus
  • Controller: NEC D8041

Foto's:

Arduino programma

  1.  
  2. /*
  3.     FM20X2AA-DA
  4.    
  5.     PINOUT:
  6.      +--+
  7. GND  |..|  D7        - Arduino pin 7
  8. GND  |..|  D6        - Arduino pin 6
  9. GND  |..|  D5        - Arduino pin 5
  10. GND  |..|  D4        - Arduino pin 4
  11. GND  |..|  D3        - Arduino pin 3
  12. GND  |..|  D2        - Arduino pin 2
  13. GND  |..|  D1        - Arduino pin 1
  14. GND  |..|  D0        - Arduino pin 0
  15. GND  |..|  ??        - Arduino pin 8
  16. GND  |..|  ??        - Arduino pin 9
  17. GND  |..|  ??        - Arduino pin 10
  18. GND  |..|  ??        - Arduino pin 11
  19. GND  |..|  SELFTEST  - Arduino pin 12
  20.      +--+
  21.  
  22. SELFTEST = LOW bij inschakelen spanning => Zelftest.
  23. */
  24.  
  25. int D0 = 0;
  26. int D1 = 1;
  27. int D2 = 2;
  28. int D3 = 3;
  29. int D4 = 4;
  30. int D5 = 5;
  31. int D6 = 6;
  32. int D7 = 7;
  33.  
  34. int LEDPIN = 13;
  35.  
  36. int SELFTEST = 12;
  37.  
  38. void setup() {
  39. pinMode(D0,OUTPUT);
  40. pinMode(D1,OUTPUT);
  41. pinMode(D2,OUTPUT);
  42. pinMode(D3,OUTPUT);
  43. pinMode(D4,OUTPUT);
  44. pinMode(D5,OUTPUT);
  45. pinMode(D6,OUTPUT);
  46. pinMode(D7,OUTPUT);
  47.  
  48. pinMode(LEDPIN,OUTPUT);
  49.  
  50. pinMode(8,OUTPUT);
  51. pinMode(9,OUTPUT);
  52. pinMode(10,OUTPUT);
  53. pinMode(11,OUTPUT);
  54. pinMode(SELFTEST,OUTPUT);
  55.  
  56. digitalWrite(8,LOW);
  57. digitalWrite(9,LOW);
  58. digitalWrite(10,HIGH);
  59. digitalWrite(11,LOW);
  60. digitalWrite(SELFTEST,HIGH);
  61.  
  62. digitalWrite(10,HIGH); setStates(72); digitalWrite(10,LOW);delay(100);      
  63. digitalWrite(10,HIGH); setStates(69); digitalWrite(10,LOW);delay(100);        
  64. digitalWrite(10,HIGH); setStates(76); digitalWrite(10,LOW);delay(100);        
  65. digitalWrite(10,HIGH); setStates(76); digitalWrite(10,LOW);delay(100);
  66. digitalWrite(10,HIGH); setStates(79); digitalWrite(10,LOW);delay(100);
  67. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  68. digitalWrite(10,HIGH); setStates(87); digitalWrite(10,LOW);delay(100);
  69. digitalWrite(10,HIGH); setStates(79); digitalWrite(10,LOW);delay(100);
  70. digitalWrite(10,HIGH); setStates(82); digitalWrite(10,LOW);delay(100);
  71. digitalWrite(10,HIGH); setStates(76); digitalWrite(10,LOW);delay(100);
  72. digitalWrite(10,HIGH); setStates(68); digitalWrite(10,LOW);delay(100);
  73. digitalWrite(10,HIGH); setStates(33); digitalWrite(10,LOW);delay(100);
  74. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  75. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  76. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  77. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  78. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  79. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  80. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  81. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  82. digitalWrite(10,HIGH); setStates(87); digitalWrite(10,LOW);delay(100);
  83. digitalWrite(10,HIGH); setStates(87); digitalWrite(10,LOW);delay(100);
  84. digitalWrite(10,HIGH); setStates(87); digitalWrite(10,LOW);delay(100);
  85. digitalWrite(10,HIGH); setStates(46); digitalWrite(10,LOW);delay(100);
  86. digitalWrite(10,HIGH); setStates(74); digitalWrite(10,LOW);delay(100);
  87. digitalWrite(10,HIGH); setStates(79); digitalWrite(10,LOW);delay(100);
  88. digitalWrite(10,HIGH); setStates(83); digitalWrite(10,LOW);delay(100);
  89. digitalWrite(10,HIGH); setStates(86); digitalWrite(10,LOW);delay(100);
  90. digitalWrite(10,HIGH); setStates(65); digitalWrite(10,LOW);delay(100);
  91. digitalWrite(10,HIGH); setStates(78); digitalWrite(10,LOW);delay(100);
  92. digitalWrite(10,HIGH); setStates(68); digitalWrite(10,LOW);delay(100);
  93. digitalWrite(10,HIGH); setStates(73); digitalWrite(10,LOW);delay(100);
  94. digitalWrite(10,HIGH); setStates(74); digitalWrite(10,LOW);delay(100);
  95. digitalWrite(10,HIGH); setStates(75); digitalWrite(10,LOW);delay(100);
  96. digitalWrite(10,HIGH); setStates(69); digitalWrite(10,LOW);delay(100);
  97. digitalWrite(10,HIGH); setStates(78); digitalWrite(10,LOW);delay(100);
  98. digitalWrite(10,HIGH); setStates(46); digitalWrite(10,LOW);delay(100);
  99. digitalWrite(10,HIGH); setStates(78); digitalWrite(10,LOW);delay(100);
  100. digitalWrite(10,HIGH); setStates(76); digitalWrite(10,LOW);delay(100);
  101. digitalWrite(10,HIGH); setStates(32); digitalWrite(10,LOW);delay(100);
  102. }
  103. void loop()
  104. {
  105. }
  106.  
  107. void setStates(byte states){
  108.   zeroStates();
  109.   if (states & 1) digitalWrite(D0, HIGH);
  110.   if (states & 2) digitalWrite(D1, HIGH);
  111.   if (states & 4) digitalWrite(D2, HIGH);
  112.   if (states & 8) digitalWrite(D3, HIGH);
  113.   if (states & 16) digitalWrite(D4, HIGH);
  114.   if (states & 32) digitalWrite(D5, HIGH);
  115.   if (states & 64) digitalWrite(D6, HIGH);
  116.   if (states & 128) digitalWrite(D7, HIGH);
  117. }
  118.  
  119. void zeroStates(){
  120.   digitalWrite(D0, LOW);
  121.   digitalWrite(D1, LOW);
  122.   digitalWrite(D2, LOW);
  123.   digitalWrite(D3, LOW);
  124.   digitalWrite(D4, LOW);
  125.   digitalWrite(D5, LOW);
  126.   digitalWrite(D6, LOW);
  127.   digitalWrite(D7, LOW);
  128. }
  129.  
  130.  

 

Reacties:
Er zijn nog geen reacties op deze pagina.

proceed-marketing proceed-marketing