Changeset 64 in projects for bull-anelex-project/trunk
- Timestamp:
- Feb 20, 2011, 2:41:41 PM (13 years ago)
- Location:
- bull-anelex-project/trunk/anelex-interface/src
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
bull-anelex-project/trunk/anelex-interface/src/anelex.c
r63 r64 28 28 #include "anelex_code.h" 29 29 #include "anelex.h" 30 #include "constants.h" 30 31 31 32 void print_line() { 32 33 // startup line printing 33 //puts("Starting line transmission");34 puts("Starting line transmission, waiting for CA"); 34 35 current_line_cnt = 0; 35 36 print_line_feed(); … … 40 41 void print_line_feed() { 41 42 // Lege Zeilenvorschub an (spaeter mal variabel) 43 44 // Experiment: RESET vor jedem Zeilenvorschub 45 // 18.02.11 46 /* 47 start_reset(); 48 _delay_us(10); 49 stop_reset(); 50 _delay_us(10); 51 */ 52 42 53 set_data(0x01); 43 _delay_us( 800);54 _delay_us(ANELEX_NEWLINE_WAIT); 44 55 start_strobe(); 45 _delay_us( 1);56 _delay_us(ANELEX_NEWLINE_LENGTH); 46 57 stop_strobe(); 47 58 } … … 62 73 // normales zeichen 63 74 char transformed = anelex_code[ orig ]; 64 //printf("%d: Zeichen %c, entspricht oktal %o\n", current_counter, orig, transformed);75 printf("%d: Zeichen %c, entspricht oktal %o\n", current_counter, orig, transformed); 65 76 //printf("%d", current_counter, orig); 77 putchar(orig); 66 78 //_delay_us(100); 67 79 68 80 // LEGE ZEICHEN AN: 81 _delay_us(ANELEX_CHAR_WAIT); 69 82 set_data(transformed); 70 _delay_us( 20);83 _delay_us(ANELEX_CHAR_STROBE_WAIT); 71 84 start_strobe(); 72 _delay_us( 2);85 _delay_us(ANELEX_CHAR_STROBE_LENGTH); 73 86 stop_strobe(); 74 87 // jetzt bis zum naechsten Zeichen warten … … 83 96 line_state = LINE_PRINTING; 84 97 set_data(0x01); // aufraeumen am DATENPORT 85 //printf("Print Command\n");98 printf("Print Command\n"); 86 99 87 100 start_printcmd(); 88 _delay_us( 10);101 _delay_us(ANELEX_PRINT_CMD_LENGTH); 89 102 stop_printcmd(); 90 103 // warten auf auf das naechste CA. … … 96 109 return; 97 110 98 //printf("Zeile wird gedruckt...\n");111 printf("Zeile wird gedruckt...\n"); 99 112 //puts("printing"); 100 113 while(!is_ready()); // das ist jetzt ziemlicher ... quatsch 101 114 puts("line finished"); 102 //printf("Zeile fertig gedruckt\n");115 printf("Zeile fertig gedruckt\n"); 103 116 104 117 line_state = LINE_FINISHED; -
bull-anelex-project/trunk/anelex-interface/src/data.c
r63 r64 62 62 63 63 char string_numbers[] PROGMEM = "\ 64 1234567890123456789012345678901234567890123456789012345678901234567890\n\ 64 123\n\ 65 1234567890\n\ 66 12345678901234567890\n\ 67 123456789012345678901234567890\n\ 68 1234567890123456789012345678901234567890\n\ 69 12345678901234567890123456789012345678901234567890\n\ 65 70 123456789012345678901234567890123456789012345678901234567890\n\ 66 12345678901234567890123456789012345678901234567890\n\ 67 1234567890123456789012345678901234567890\n\ 68 123456789012345678901234567890\n\ 69 12345678901234567890\n\ 70 1234567890\n\ 71 123\n"; 71 1234567890123456789012345678901234567890123456789012345678901234567890\n"; 72 72 73 73 // yes, this IS the help message which is printed via RS232 on "?help" command. -
bull-anelex-project/trunk/anelex-interface/src/frontend.c
r63 r64 131 131 memset(¤t_line, 0, LINE_LENGTH); // null the output buffer (important) 132 132 133 printf("Readline!\n");133 //printf("Readline!\n"); 134 134 // check if we get the text from ROM 135 135 if(builtin_data.index) { … … 155 155 while(is_button()); 156 156 puts("Button pressed."); 157 strcpy(current_line, "?print 1");157 strcpy(current_line, "?print 5"); 158 158 return; // important: Quit readline now. 159 159 } else if(!is_cts()) { -
bull-anelex-project/trunk/anelex-interface/src/frontend.h
r63 r64 79 79 **/ 80 80 81 #define BUFFER_LEN 2081 #define BUFFER_LEN 100 82 82 83 83 volatile struct print_buffer_t { -
bull-anelex-project/trunk/anelex-interface/src/main.c
r63 r64 11 11 #include "toolchain.h" 12 12 #include "frontend.h" 13 #include "constants.h" 14 13 15 14 16 static FILE output = FDEV_SETUP_STREAM(stdout_transmit, NULL, _FDEV_SETUP_WRITE); … … 89 91 while(line_state != LINE_FINISHED) { 90 92 puts("Wait for printer finished..."); 91 _delay_ms( 200);93 _delay_ms(ANELEX_WAIT_PRINTER_FINISHED); 92 94 } 93 95 -
bull-anelex-project/trunk/anelex-interface/src/wiring.h
r62 r64 73 73 #define start_printcmd() ( PORTC &= ~(1 << PORTC_PRINTCMD) ) 74 74 #define stop_printcmd() ( PORTC |= (1 << PORTC_PRINTCMD) ) 75 #define start_reset() ( PORTC &= ~(1 << PORTC_RESET) ) 76 #define stop_reset() ( PORTC |= (1 << PORTC_RESET) ) 75 77 76 78 // Port Output D: Apperatus Indicators, flow control
Note: See TracChangeset
for help on using the changeset viewer.