Suchergebnisse für "PSTR"
char *str); void usart_write_int(int data); // #define usart_write(format, args...) usart_write_P(PSTR (format) , ## args) //---------------------------------------------------------------------------- #endif //_UART_H
in
„Nach USART-Senden steht der yC“
·
Mikrocontroller und Digitale Elektronik
·
28.01.2012 10:43
File Control Blocks */ fdev_setup_stream(&dev0,&serout0f,&serin0f,_FDEV_SETUP_RW); fprintf_P(&dev0,PSTR ("Hallo")); }
in
„Probleme mit fdevopen“
·
Mikrocontroller und Digitale Elektronik
·
12.10.2006 03:55
Thread
(x86)\Arduino\hardware\arduino\avr\libraries\SPI\src/SPI.h:146:27: note: suggested alternative: 'PSTR ' C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src/SPI.h:146:65: error: 'DORD' was not declared in this scope spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _
(x86)\Arduino\hardware\arduino\avr\libraries\SPI\src/SPI.h:146:27: note: suggested alternative: 'PSTR ' C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src/SPI.h:146:65: error: 'DORD' was not declared in this scope spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _
Mikrocontroller und Digitale Elektronik
· Maximilian S.
· 08.05.2020 14:08
· 82 Antworten
#endif UCSR0A = (1<<U2X); UCSR0B = (1<<TXEN)|(1<<RXEN); UBRR0L = 4; fdevopen(put, get, 0); puts_P(PSTR ("S65 LCD Test")); glcdFillRect(0, 0, 131, 175, BLACK); while(1) { recvPicture(); } }
in
„The Siemens S65 132x176, 65536 color display with AVR“
·
Projekte & Code
·
11.10.2006 22:06
uint8_t uart_ready( void ); extern uint16_t uart_getc(void); #define uart_puts_P(__s) uart_puts_p(PSTR (__s)) extern void setTransmitMode( void ); extern void setReceiveMode( void ); #endif /* DMX_OUT_H_ */
in
„Nochmal RS485 Kommunikation“
·
Mikrocontroller und Digitale Elektronik
·
03.01.2012 17:06
EthernetUDP udp; #endif #ifdef W5100 #else static void homePage (BufferFiller& buf) { buf.emit_p(PSTR ("<title>tttt</title>" "<h2>123</h2>" "<a href='c'>Configure</a> - <a href='s'>Send Packet</a>" "<h3>xyz</h3>" "<pre>")); } #endif void EthernetReceiveUDP(){ #ifdef W5100 // packetLoop(); #else uint16
in
„#ifdef includes und funktionsdeklarationen (arduino)“
·
Mikrocontroller und Digitale Elektronik
·
15.04.2015 14:58
Thread
buffer,10); writeString(buffer); } int main() { initLCD162C(); writeStringP(PSTR ("Hello World")); while(1){} } [/c] Das geht so. Aber wenn ich in der initLCD162C() anstatt [c] cmd4(CMD_CONFIG | CONFIG_2LINE);[/c] folgendes [c]cmd4(CMD_CONFIG | CONFIG_1LINE | CONFIG
Mikrocontroller und Digitale Elektronik
· Daniel
· 05.09.2013 22:04
· 0 Antworten
extern void lcd_print_str (char *Buffer); #define lcd_print(a,b,format, args...) lcd_print_P(a,b,PSTR (format) , ## args) extern volatile unsigned char back_light; //Anzahl der Zeilen 1,2 oder 4 //#define ONE_LINES #define TWO_LINES //#define THREE_LINES //#define FOUR_LINES #define LCD_DDR DDRB #define
in
„Serielles Display“
·
Mikrocontroller und Digitale Elektronik
·
11.11.2013 17:37
Clock(void); void lcd_char(char ps, char cd); #define lcd_print(a,b,format, args...) lcd_print_P(a,b,PSTR (format) , ## args); volatile unsigned char back_light; //Anzahl der Zeilen 1,2 oder 4 //#define ONE_LINES #define TWO_LINES //#define THREE_LINES //#define FOUR_LINES #define PORT_LCD_DATA_ENABLE PORTB
in
„Serielles Display“
·
Mikrocontroller und Digitale Elektronik
·
16.12.2013 15:25
Thread
das PROGMEM void printstr_P(PGM_P s) { // gib den Text aus } printstr_P(s); printstr_P(PSTR ("Hallo")); [/c] Man muß also die Parameterübergabe an die print-Funktionen anders machen und in den Funktionen auch anders auf die Strings zugreifen. Da ja bei den kleinen Display nicht soviele
Mikrocontroller und Digitale Elektronik
· B. H.
· 01.01.2021 14:53
· 710 Antworten
Thread
avr-gcc v7 folgendermaßen: [c]extern const char __attribute__((__progmem__)) str[]; const char* pstr (int i) { return &str[i]; } char get (int i) { return str[i]; }[/c] Übersetzt mit -Os -mmcu=avrtiny [avrasm] pstr : subi r24,lo8(-(str+16384)) sbci r25,hi8(-(str+16384))
Mikrocontroller und Digitale Elektronik
· Atmel8BitNews
· 19.06.2023 22:58
· 485 Antworten
Thread
stdio.h> //In main() (oder wo auch immer ;-) fdevopen(glcdPut, NULL, 0); //Ausgabe printf_P(PSTR ("%02i:%02i"), minute, second); Im Makefile mußt Du darauf achten die richtige Version zu nehmen. Wenn ich mich recht erinnere, wird in der derzeitigen WinAVR-Distribution die minimale stdio-Lib eingebunden
Projekte & Code
· ape
· 26.11.2012 18:01
· 325 Antworten
Thread
value1" und des Arrays "values" mit dem jeweiligen Text-char-Array finde ich wenig elegant. Das Makro "PSTR " lässt sich an dieser Stelle nicht nutzen, weshalb ich hier den Umweg über die statischen Variablen "text1/2/3" wählen musste. Gibt es hier eine bessere Lösung? Sollen nun der zur Initialisierung
Mikrocontroller und Digitale Elektronik
· Roland ..
· 30.07.2023 21:48
· 43 Antworten
'\r') { stringzaehler=0; for(i=0;i<9;i++) { uart_putchar(string[i]); } //gleich = strcmp_P(string,PSTR ("Measure")); gleich = strcmp_P(string,COMMAND1); if(gleich==0) {uart_str("GLEICH\n)");} }else{ string[stringzaehler]=received_char; stringzaehler++; if(stringzaehler==8) { stringzaehler=0; } } } }
in
„strcmp_P“
·
Mikrocontroller und Digitale Elektronik
·
11.10.2006 19:19
eth_buffer[ICMP_OFFSET]; //Add ICMP Data //### nicht notwendig // memcpy_P(ð_buffer[ICMP_DATA],PSTR ("abcdefghijklmnopqrstuvwabcdefghi"),32); //Das ist ein Echo Reply Packet icmp->ICMP_Type = 0x00; icmp->ICMP_Code = 0x00; icmp->ICMP_Id = icmp_id; icmp->ICMP_SeqNum = icmp_sn; //Berechnung der ICMP Checksumme
in
„Webserver ATmega32/644DIP ENC28J60“
·
Projekte & Code
·
10.12.2007 18:55
; void usart_write_P (const char *Buffer,...); #define usart_write(format, args...) usart_write_P(PSTR (format) , ## args) //---------------------------------------------------------------------------- #endif //_UART_H
in
„Interrupt Variable übergeben“
·
Mikrocontroller und Digitale Elektronik
·
22.12.2011 18:58
UBRRL_VALUE; UCSRB=(0<<RXCIE)|(0<<RXEN)|(1<<TXEN); UCSRC=(1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); putstring_P(PSTR ("ready...\r\n\r\n")); OCR1AH=0; OCR1AL=1; TCCR1A=0b01000000; TCCR1B=0b00001001; DDRC|=0b00111111; DDRD|=0b11000000; CTRLDDR|=(1<<A0)|(1<<WR)|(1<<PB1); LCDwritecmd(0x10); _delay_ms(100); LCDwritecmd(
in
„LCD mit Uraltcontroller SED1300 ansteuern“
·
Mikrocontroller und Digitale Elektronik
·
23.11.2012 18:32
// // Snippet 3 // display "Hello World" on LCD first line //lcd_line_one(); //lcd_write_string_p(PSTR ("Hello World\0")); // message from flash space while(1) { //////////// DAC Kontrasteinstellung //////////////////// DACB.CH0DATA = Kontrast; // warte bis sendung fertig while (!DACB.STATUS & DAC_CH0DRE_bm
in
„LCD Ansteuerung Atmel ATxmeag 128 A3“
·
Mikrocontroller und Digitale Elektronik
·
13.05.2011 15:52
|= _BV(LCD_RST) #define LCD_RST_L() LCD_CTRL &= ~_BV(LCD_RST) #define lcd_puts_P(__s) lcd_puts_p(PSTR (__s)) #define XMAX 127 #define XMIN 0 #define YMAX 63 #define YMIN 0 #define G_BASE 0x200 #define BYTES_PER_ROW 21 void lcd_init(void); void lcd_status(void); void lcd_status_am(void); void lcd_send_cmd
in
„128x64 Grafikdisplay von Pollin“
·
Projekte & Code
·
11.10.2006 22:05
Thread
dem Flash Speicher zu verwenden, anstatt RAM zu belegen: [c] snprintf_P(buffer, sizeof(buffer), PSTR ("\twert_min[9] %u \t wert_max[9] %u\n"), wert_min[9], wert_max[9]); [/c] Wenn du die serielle Schnittstelle als Konsole (stdout) einrichtest, kannst du die Strings direkt mit printf_P() ausgeben
Mikrocontroller und Digitale Elektronik
· Gregor B.
· 30.01.2019 19:02
· 11 Antworten
Thread
Offentischtlich habe ich Probleme, den Zeilenumbruch zu senden. So sende ich Zeichen ab: printf_P(PSTR ("12\n")); In Hyperteminal wird auch 12 ausgegeben, aber sie kommt leider nicht am anderen Mikrokontroler an. Wenn ich mit Hyperterminal eine Zahl absende, dann kommt es auch an nur wenn ich es
Mikrocontroller und Digitale Elektronik
· Holger B.
· 19.01.2009 12:28
· 581 Antworten
include <stdio.h> #include <inttypes.h> #include "i2cmaster.h" #define PRINT(string, ...) printf_P(PSTR (string), ##__VA_ARGS__) static int putchar__(char c, FILE *stream) { uart_putc(c); return 0; } static FILE mystdout = FDEV_SETUP_STREAM(putchar__, 0, _FDEV_SETUP_WRITE); int main(void) { uart_init(UART_BAUD_SELECT
in
„LM75 + AVR + I2C Lib pfleury will nicht“
·
Mikrocontroller und Digitale Elektronik
·
13.01.2019 17:42
include <stdio.h> #include <inttypes.h> #include "i2cmaster.h" #define PRINT(string, ...) printf_P(PSTR (string), ##__VA_ARGS__) static int putchar__(char c, FILE *stream) { uart_putc(c); return 0; } static FILE mystdout = FDEV_SETUP_STREAM(putchar__, 0, _FDEV_SETUP_WRITE); int main(void) { uart_init(UART_BAUD_SELECT
in
„LM75 + AVR + I2C Lib pfleury will nicht“
·
Mikrocontroller und Digitale Elektronik
·
13.01.2019 17:54
10; i++) { mein_zeichen = 'A'+i; // ASCII Codes erzeugen lcd_setcursor(0,1); sprintf_P(ram_string, PSTR ("Buchstabe %c"), mein_zeichen); lcd_string(ram_string); // hier sinnvoll _delay_ms(300); } _delay_ms(3000); /*****************************************************************************/ // Strings
in
„LCD 162D mit ATmega8535“
·
Mikrocontroller und Digitale Elektronik
·
12.08.2011 17:21
10; i++) { mein_zeichen = 'A'+i; // ASCII Codes erzeugen lcd_setcursor(0,1); sprintf_P(ram_string, PSTR ("Buchstabe %c"), mein_zeichen); lcd_string(ram_string); // hier sinnvoll _delay_ms(300); } _delay_ms(3000); /*****************************************************************************/ // Strings
in
„Display nach Tutorial Probleme“
·
Mikrocontroller und Digitale Elektronik
·
07.10.2011 14:16
10; i++) { mein_zeichen = 'A'+i; // ASCII Codes erzeugen lcd_setcursor(0,1); sprintf_P(ram_string, PSTR ("Buchstabe %c"), mein_zeichen); lcd_string(ram_string); // hier sinnvoll _delay_ms(300); } _delay_ms(3000); /*****************************************************************************/ // Strings
in
„Display nach Tutorial Probleme“
·
Mikrocontroller und Digitale Elektronik
·
10.10.2011 21:15
void uputs0_pgm( PGM_P s ); // send string from program memory +#define uputs0_pgm_P(__s) uputs0_pgm(PSTR (__s)) + #define UTX0_IEN SBIT( UCSR0B, UDRIE0 ) #define URX0_IEN SBIT( UCSR0B, RXCIE0 )
in
„AVR-GCC: UART mit FIFO“
·
Projekte & Code
·
30.11.2009 23:36
; void usart_write_P (const char *Buffer,...); #define usart_write(format, args...) usart_write_P(PSTR (format) , ## args) //---------------------------------------------------------------------------- #endif //_UART_H
in
„µSD Karte Ulrich Radig Code funktioniert nicht mehr“
·
Mikrocontroller und Digitale Elektronik
·
11.02.2011 14:47
; void usart_write_P (const char *Buffer,...); #define usart_write(format, args...) usart_write_P(PSTR (format) , ## args) //---------------------------------------------------------------------------- #endif //_UART_H
in
„SD-Karte mit Mega644 & Software von Ulrich Radig“
·
Mikrocontroller und Digitale Elektronik
·
02.07.2013 16:17
void lcd_puts_R(char *str); void lcd_puts_P(const char *str); #define lcd_puts(format) lcd_puts_P(PSTR (format)) #define CMD 0x00 #define DATA 0x01 void lcd_transfer_4bit(uint8_t data, uint8_t cd); #define lcd_cmd(command) lcd_transfer_4bit(command, CMD); #define lcd_data(databyte) lcd_transfer_4bit(databyte
in
„STM32F407, I2C LCD, Initialisierung“
·
Mikrocontroller und Digitale Elektronik
·
23.07.2020 15:07
uart_puts_rom ------------------------------------------------------- */ #define puts_rom(str) (uart_puts_rom(PSTR (str))) void uart_puts_rom(const uint8_t *dataPtr) { uint8_t c; for (c=pgm_read_byte(dataPtr); c; ++dataPtr, c=pgm_read_byte(dataPtr)) uart_putchar(c); } /* ------------------------------------------
in
„Fehlerhafte Adressierung von lokalen Arrays bei tinyAVR(R) 0-series“
·
Mikrocontroller und Digitale Elektronik
·
24.03.2023 14:25
; void usart_write_P (const char *Buffer,...); #define usart_write(format, args...) usart_write_P(PSTR (format) , ## args) //---------------------------------------------------------------------------- #endif //_UART_H
in
„Empfangen über UART mit ATmega32“
·
Mikrocontroller und Digitale Elektronik
·
27.09.2011 15:36
; void usart_write_P (const char *Buffer,...); #define usart_write(format, args...) usart_write_P(PSTR (format) , ## args) //---------------------------------------------------------------------------- #endif //_UART_H
in
„Funk-uhr über AVR Programmieren mit DCF01“
·
Mikrocontroller und Digitale Elektronik
·
04.11.2013 18:10
my_putramstring(uint8_t *p); void own_printf(const uint8_t *s,...); #define tiny_printf(str,...) (own_printf(PSTR (str), ## __VA_ARGS__)) #define my_printf tiny_printf #define printf my_printf #endif
in
„Ausgabe mittels printf über UART für ATmega / ATtiny“
·
Projekte & Code
·
17.02.2019 12:51
Thread
LPARAM) ; int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static char szAppName[] = "SetPixelFunc" ; HWND hwnd ; MSG msg ; WNDCLASSEX wndclass ; wndclass.cbSize = sizeof
LPARAM) ; int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static char szAppName[] = "SetPixelFunc" ; HWND hwnd ; MSG msg ; WNDCLASSEX wndclass ; wndclass.cbSize = sizeof
Softwareentwicklung
· GB
· 12.01.2011 15:50
· 160 Antworten
fat_markSector00(); // löschen des sektors (nur im puffer). fat_makeRowDataEntry(0,(unsigned char *)strings(PSTR (". ")),0x10,currentCluster,0); // macht "." eintrag des dirs // fat_makeRowDataEntry(0,". ",0x10,currentCluster,0); // macht "." eintrag des dirs // fat_makeRowDataEntry(1,".. ",0x10,fat.dir,0); // macht ".." eintrag des dirs fat_makeRowDataEntry(1,(unsigned char *)strings(PSTR (".. ")),0x10,fat.dir,0); // macht ".." eintrag des dirs fat_writeSector(fat_clustToSec(currentCluster)); // schreibt einträge auf karte ! fat_markSector00(); // löschen des sektors (nur im puffer).
in
„MMC SD library FAT16 FAT32 read write“
·
Projekte & Code
·
06.08.2008 00:11
Thread
linken Rand die automatischen Funktionen der Library. D.h. für diesen Text ruft man nur glcdPrint_P(PSTR ("text, bla bla hier")); auf, In den letzten Bildern seht ihr übergroße Fonts, sozusagen Icons/Images in 4 Farben. Allerdings sind diese 4 Farben hauptsächlich so gewählt das ein Anti-Aliasing stattfindet
Projekte & Code
· Hagen
· 05.02.2011 20:05
· 199 Antworten
Thread
softSerial_sendChar(c); text++; } } // Send a char array from program memory, use with PSTR (). void softSerial_sendStr_P(PGM_P text) { char c; while ((c=pgm_read_byte(text))) { softSerial_sendChar(c); text++; } } [/c] Empfangen kannst du damit nichts
Mikrocontroller und Digitale Elektronik
· Christian
· 28.07.2018 20:51
· 26 Antworten
extern void lcd_write_flash(uint32_t, uint16_t); // Flash schreiben #define lcd_puts_P(__s) lcd_puts_p(PSTR (__s)) #endif
in
„bitte Hilfe, interner Compiler Fehler“
·
Mikrocontroller und Digitale Elektronik
·
08.10.2013 11:35
ks0108ReadFontData, BLACK); // Set a position ks0108GotoXY(15,5); // Print some text ks0108Puts_P(PSTR ("Uhrzeit:")); DDRB &= ~0b00000011; PORTB |= 0b00000011; TCCR1A = (1<<COM1A0); // Togglen bei Compare Match TCCR1B = (1<<WGM12) | (1<<CS11); // CTC-Mode; Prescaler 8 TIMSK = (1<<OCIE1A); // Timer-Compare
in
„ATmega16 liefert kein Signal an allen Pins außer I2c“
·
Mikrocontroller und Digitale Elektronik
·
23.04.2017 15:14
write_str(char *str); void write_P (const char *Buffer,...); #define usart_write(format, args...) write_P(PSTR (format) , ## args) //---------------------------------------------------------------------------- friend usartInterrupt; }; #endif //_UART_H
in
„#define (wie kann ich vektor erstellen.“
·
Mikrocontroller und Digitale Elektronik
·
02.01.2016 11:29
serial_in_command) == 2 && !faehrt ) else if( strstr(serial_in_command, "up?") ) { sprintf_P(s_out_str, PSTR ("up %s Uhr"), MY_EEP_VAR.fenster_up_time_str); Serial.println(s_out_str); } else if( strlen(serial_in_command) >= 7 ) { uint8_t hh=atoi(strncpy(serial_in_buff, &serial_in_command[2], 2)); if( 0 <= hh
in
„Serieller Monitor bei Arduino“
·
Mikrocontroller und Digitale Elektronik
·
30.06.2017 09:01
but the format string resides in flash */ printf_P("E\r\n"); /* while(scanf("%s",s) == 0); printf_P(PSTR ("\r\nYou entered '%s'\r\n"),s);*/ } return 0; } SIGNAL(SIG_UART_RECV) { // Receive interrupt char c; c = UDR; // Get received char rbuf[r_in & RMASK] = c; r_in++; } SIGNAL(SIG_UART_DATA) { // Data register
in
„Ziemlichgross“
·
Mikrocontroller und Digitale Elektronik
·
11.10.2006 13:47
Thread
. Außerdem sollten bei entsprechenden Controllern (z.B. AVR) String-Konstanten mit "PROGMEM" oder PSTR () erzeugt werden, damit sie während der Laufzeit nicht ins RAM kopiert werden. Beides ist extrem speicherschonend.
Mikrocontroller und Digitale Elektronik
· Sam ..
· 03.12.2011 03:02
· 98 Antworten
Thread
im Flash, einmal für eine komplett unnötige Kopie desselben Strings im eh schon knappen RAM! => PSTR , pgmspace.h, ... und, wie ist "AbsDelay" definiert? hoffentlich als Variante von [c] void AbsDelay(uint16_t x) { while (x--) _delay_ms(1.0); } [/c] und nicht als [c] void AbsDelay(uint16
Mikrocontroller und Digitale Elektronik
· kraemer90
· 10.01.2011 18:32
· 46 Antworten
Thread
const char *s ); void rs232_puts_p(const char *s ); #define rs232_puts_P(__s) rs232_puts_p(PSTR (__s)) #endif #ifdef rs232_OUTFUNCTIONS void rs232_sint_len(int z,unsigned char len); void rs232_sint(int z); #endif extern Ring_buffer rs232_Rxr; extern Ring_buffer rs232_Txr; #endif
Projekte & Code
· Jürgen H.
· 08.02.2017 19:35
· 93 Antworten
include <avr/pgmspace.h> #include <string.h> #include <stdio.h> #define PRINT(string, ...) printf_P(PSTR (string), ##__VA_ARGS__) #include "sdram.h" void sdram_init(void) { // PORTs H, J, K are used for SDRAM, 4 Bit mode PORTH.DIR=0xFF; PORTJ.DIR=0xF0; PORTK.DIR=0xFF; //PORTCFG.EBIOUT = PORTCFG_EBIADROUT_PF_gc
in
„Compilerfehler?“
·
Mikrocontroller und Digitale Elektronik
·
04.03.2016 14:38
Thread
lcd_puts_p (*texte++); } } int main(void) { int index, new_index; ... printf_P (PSTR ("gestartet\n")); index = 0; for (;;) { for (;;) { const __flash t_menu *menu = &main_menu[index]; show_display_lines (menu);
Mikrocontroller und Digitale Elektronik
· Andreas
· 20.04.2025 22:27
· 72 Antworten
Thread
paar Eigenheiten der Controller einzustellen ist nun wirklich nicht so schwer. Immer noch besser als PSTR -Orgie beim avr.
Mikrocontroller und Digitale Elektronik
· Piet
· 14.10.2012 11:10
· 306 Antworten
Thread
[c] // in Firmware void uart_handlemsg(const char* msg) { ... if (0 == strcmp_P(msg, PSTR ("<rest>")) { cli(); wdt_enable(WDTO_15MS); while (1) { } } ... } // in AVRootloader.asm BootSign: .db "<rest>" [/c]
Projekte & Code
· Hagen Re
· 23.08.2026 19:34
· 912 Antworten