Max7456
Class representing a max7456
 All Classes Files Functions Variables Typedefs Enumerator Macros Pages
max7456Registers.h
Go to the documentation of this file.
1 /*
2  * max7456Registers.h
3  *
4  * Created on: 13 oct. 2012
5  * Author: Benoit
6  */
7 
8 #ifndef MAX7456REGISTERS_H_
9 #define MAX7456REGISTERS_H_
10 
11 
12 #include <arduino.h>
13 
14 
19 typedef byte charact[54];
20 
21 #define VM0_ADDRESS_WRITE 0x00
22 #define VM0_ADDRESS_READ 0x80
23 
28 union REG_VM0
29 {
31  unsigned char whole ;
35  struct
36  {
41  unsigned char videoBuffer :1;
42 
46  unsigned char softwareResetBit : 1;
47 
52  unsigned char verticalSynch : 1;
53 
58  unsigned char enableOSD : 1;
59 
65  unsigned char synchSelect : 2;
66 
71  unsigned char videoSelect :1;
72 
74  unsigned char unused : 1;
75 
76  } bits;
77 };
78 
79 
80 #define VM1_ADDRESS_WRITE 0x01
81 #define VM1_ADDRESS_READ 0x81
82 
86 union REG_VM1
87 {
89  unsigned char whole;
93  struct
94  {
95 
102  unsigned char blinkingDutyCycle : 2;
103 
104 
111  unsigned char blinkingTime : 2;
112 
113 
124  unsigned char backgroundModeBrightness : 3;
125 
130  unsigned char backgroundMode : 1;
131  } bits;
132 };
133 
134 #define HOS_ADDRESS_WRITE 0x02
135 #define HOS_ADDRESS_READ 0x82
136 
140 union REG_HOS
141 {
143  unsigned char whole;
147  struct
148  {
158  unsigned char horizontalPositionOffset : 6;
159 
161  unsigned char unsused : 2;
162 
163  } bits;
164 };
165 
166 
167 #define VOS_ADDRESS_WRITE 0x03
168 #define VOS_ADDRESS_READ 0x83
169 
173 union REG_VOS
174 {
176  unsigned char whole;
180  struct
181  {
191  unsigned char verticalPositionOffset : 5;
193  unsigned char unsused : 3;
194 
195  } bits;
196 };
197 
198 #define DMM_ADDRESS_WRITE 0x04
199 #define DMM_ADDRESS_READ 0x84
200 
203 union REG_DMM
204 {
206  unsigned char whole;
210  struct
211  {
223  unsigned char autoIncrementMode : 1;
228  unsigned char verticalSynchClear : 1;
240  unsigned char clearDisplayMemory : 1;
245  unsigned char INV : 1;
251  unsigned char BLK : 1;
257  unsigned char LBC : 1;
262  unsigned char operationModeSelection : 1;
263 
265  unsigned char unsused : 1;
266 
267 
268 
269  } bits;
270 };
271 
272 
273 #define DMAH_ADDRESS_WRITE 0x05
274 #define DMAH_ADDRESS_READ 0x85
275 
278 union REG_DMAH
279 {
281  unsigned char whole;
285  struct
286  {
289  unsigned char DisplayMemoryAdressBit8 : 1;
290  unsigned char byteSelectionBit : 1;
292  unsigned char unsused : 6;
293  } bits;
294 };
295 
296 
297 #define DMAL_ADDRESS_WRITE 0x06
298 #define DMAL_ADDRESS_READ 0x86
299 typedef unsigned char REG_DMAL;
300 
301 
302 #define DMDI_ADDRESS_WRITE 0x07
303 #define DMDI_ADDRESS_READ 0x87
304 typedef unsigned char REG_DMDI;
305 
306 #define CMM_ADDRESS_WRITE 0x08
307 #define CMM_ADDRESS_READ 0x88
308 typedef unsigned char REG_CMM;
309 
310 #define CMAH_ADDRESS_WRITE 0x09
311 #define CMAH_ADDRESS_READ 0x89
312 
316 typedef unsigned char REG_CMAH;
317 
318 #define CMAL_ADDRESS_WRITE 0x0A
319 #define CMAL_ADDRESS_READ 0x8A
320 
323 typedef unsigned char REG_CMAL;
324 
325 #define CMDI_ADDRESS_WRITE 0x0B
326 #define CMDI_ADDRESS_READ 0x8B
327 
331 union REG_CMDI
332 {
334  unsigned char whole;
338  struct
339  {
340 
342  unsigned char rightMostPixel : 2;
343 
345  unsigned char rightCenterPixel : 2;
346 
348  unsigned char leftCenterPixel : 2;
349 
351  unsigned char leftMostPixel : 2;
352 
353  } bits;
354 };
355 
356 
357 #define OSDM_ADDRESS_WRITE 0x0C
358 #define OSDM_ADDRESS_READ 0x8C
359 
363 union REG_OSDM
364 {
366  unsigned char whole;
371  struct
372  {
381  unsigned char osdInsertionMuxSwitchingTime : 3;
382 
383 
392  unsigned char osdRiseAndFallTime : 3;
393 
394 
396  unsigned char unused : 2;
397 
398  } bits;
399 };
400 
401 
402 #define RB0_ADDRESS_WRITE 0x10
403 #define RB0_ADDRESS_READ 0x90
404 
405 #define RB1_ADDRESS_WRITE 0x11
406 #define RB1_ADDRESS_READ 0x91
407 
408 #define RB2_ADDRESS_WRITE 0x12
409 #define RB2_ADDRESS_READ 0x92
410 
411 #define RB3_ADDRESS_WRITE 0x13
412 #define RB3_ADDRESS_READ 0x93
413 
414 #define RB4_ADDRESS_WRITE 0x14
415 #define RB4_ADDRESS_READ 0x94
416 
417 #define RB5_ADDRESS_WRITE 0x15
418 #define RB5_ADDRESS_READ 0x95
419 
420 #define RB6_ADDRESS_WRITE 0x16
421 #define RB6_ADDRESS_READ 0x96
422 
423 #define RB7_ADDRESS_WRITE 0x17
424 #define RB7_ADDRESS_READ 0x97
425 
426 #define RB8_ADDRESS_WRITE 0x18
427 #define RB8_ADDRESS_READ 0x98
428 
429 #define RB9_ADDRESS_WRITE 0x19
430 #define RB9_ADDRESS_READ 0x99
431 
432 #define RBA_ADDRESS_WRITE 0x1A
433 #define RBA_ADDRESS_READ 0x9A
434 
435 #define RBB_ADDRESS_WRITE 0x1B
436 #define RBB_ADDRESS_READ 0x9B
437 
438 #define RBC_ADDRESS_WRITE 0x1C
439 #define RBC_ADDRESS_READ 0x9C
440 
441 #define RBD_ADDRESS_WRITE 0x1D
442 #define RBD_ADDRESS_READ 0x9D
443 
444 #define RBE_ADDRESS_WRITE 0x1E
445 #define RBE_ADDRESS_READ 0x9E
446 
447 #define RBF_ADDRESS_WRITE 0x1F
448 #define RBF_ADDRESS_READ 0x9F
449 
453 union REG_RBN
454 {
456  unsigned char whole;
460  struct
461  {
468  unsigned char characterWhiteLevel : 2;
469 
476  unsigned char characterBlackLevel : 2;
477 
479  unsigned char unused : 4;
480  } bits;
481 };
482 
483 #define OSDBL_ADDRESS_WRITE 0x6C
484 #define OSDBL_ADDRESS_READ 0xEC
485 
490 {
492  unsigned char whole;
496  struct
497  {
499  unsigned char doNotChange : 4;
504  unsigned char osdImageBlackLevelControl : 1;
505 
507  unsigned char unused : 3;
508  } bits;
509 };
510 
511 #define STAT_ADDRESS_READ 0xA0 //Read only
512 
516 union REG_STAT
517 {
519  unsigned char whole;
523  struct
524  {
529  unsigned char PALDetected : 1;
534  unsigned char NTSCDetected : 1;
539  unsigned char LOS : 1;
544  unsigned char NOTHsynchOutputLevel : 1;
549  unsigned char NOTVsynchOutputLevel : 1;
554  unsigned char characterMemoryStatus : 1;
559  unsigned char resetMode : 1;
561  unsigned char unused : 1;
562  } bits;
563 };
564 
565 
566 #define DMDO_ADDRESS_READ 0xB0
567 
571 typedef unsigned char DMDO;
572 
573 #define CMDO_ADDRESS_READ 0xC0
574 
578 union REG_CMDO
579 {
581  unsigned char whole;
585  struct
586  {
588  unsigned char rightMostPowel : 2;
590  unsigned char rightCenterPixel : 2;
592  unsigned char leftCenterPixel : 2;
594  unsigned char leftMostPixel : 2;
595  } bits;
596 };
597 
598 
599 
600 
604 #define COLOR_BLACK 0
605 
606 
610 #define COLOR_WHITE 2
611 
612 
616 #define COLOR_TRANSPARENT 1
617 
618 
622 #define COLOR_GREY COLOR_TRANSPARENT
623 
624 
628 struct PIXEL
629 {
631  byte pix3 : 2;
633  byte pix2 : 2;
635  byte pix1 : 2;
636 
637 
639  byte pix0 : 2;
640 
641 };
642 
646 union LINE
647 {
649  byte whole[3];
651  struct PIXEL pixels[3];
652 };
653 
654 
660 union CARACT
661 {
665  union LINE line[18];
666 };
667 
668 
669 enum{
674 };
675 
676 enum{
681 };
682 
683 
684 #endif /* MAX7456REGISTERS_H_ */