-
Thread
BLDC Ansteuerung
wtstep+8]; tmpvl=wavetable[wtstep+20]; tmpvh=wavetable[wtstep+16]; tmpvl=wavetable[wtstep+4]; if(!tmpul || tmpul_old)OCR0A = tmpul; if(!tmpvl || tmpvl_old)OCR1A = tmpvl; if(!tmpwl || tmpwl_old)OCR2A = tmpwl; OCR0B = tmpuh; OCR1B = tmpvh; OCR2B = tmpwh; if(tmpul && !tmpul_old){_delay_us(10);OCR0A = tmpul;} if(tmpvl && !tmpvl_old){_delay_us(10);OCR1A = tmpvl;} if(tmpwl && !tmpwl_old){_delay_us(10);OCR2A = tmpwl;} tmpul_old=tmpul; tmpvl_old=tmpvl; tmpwl_old=tmpwl; wtstep++; if(wtstep>23)wtstep=0;
-
Thread
Post-Map simulation mit ModelSim
BEGIN ---wait until Clk'event and clk = '1'; -- auch probiert wait until (rising_edge(clk)); --IF rising_edge(clk) THEN -- org IF nrst = '0' THEN stateangle <= 0; ctrclk := 0; FXYZaOK <= '0'; --....... END IF;-- nrst if/else --END IF; --clk END PROCESS;-- end runangle,
zweite if-Abfrage auf strImp. Das signal wir für Start-Interpolation genutzt. Aber die Anweisung ist dann leer, da du StartOn nicht verwendest. Jetzt ist das eine if-Abfrage ohne else-Zweig. Das hat bei mir schon
-
Thread
PIC18F bleibt bei Tastendruck hängen
pragma interrupt high_isr void high_isr (void) { char buffer[20]; unsigned int i; if ( PIR1bits.TMR1IF ) // check for TMR0 overflow { /* if menu is zero the temp is shown */ if( menu == 0 ) { ultoa( Temperature, buffer );
ON temp */ if( menu == 1 ) { On_1--; } /* minus Off temp */ if( menu == 2 ) { Off_1--; } } // END down button if( !
-
Thread
Motorregelung
//Vergleich esum = esum + e; //Integration I-Anteil if (esum < -400) esum = -400; //Begrenzung I-Anteil if (esum > 400) esum = 400; y = (kp * e) + (ki * 0.1 * esum); //Reglergleichung y += ((kd * esum) / (kd * 10 * esum)); if
; //Integration I-Anteil if (esum < -400) esum = -400; //Begrenzung I-Anteil if (esum > 400) esum = 400; y = (kp * e) + (ki * 0.1 * esum); //Reglergleichung if (y < 0) y = 0; if (y > 0xFF) y =
-
Thread
Problem mit Kompass Achsen (Mega644p + HMC5883L)
void) { unsigned char tmp; i2c_init(); _delay_ms(10); tmp = i2c_start(COMPASS_WRITE); if(tmp!=0) { i2c_stop(); return 0; } tmp = i2c_write(0x02); if(tmp!=0) { i2c_stop(); return 0; } tmp = i2c_write(0x00); if(tmp!=0) { i2c_stop();
compass_get_axis(int * x,int * y, int * z) { unsigned char tmp; tmp = i2c_start(COMPASS_WRITE); if(tmp!=0) { i2c_stop(); return 0; } tmp = i2c_write(0x03); if(tmp!=0) { i2c_stop(); return 0; } tmp =i2c_rep_start(COMPASS_READ); if(tmp!=0) {
-
Thread
ATMega 328p lm35
; EEPROM.write(addr,t); EEPROM.write(addr+1,h); addr+=2; if(addr>1023)addr=0; digitalWrite(13,0); delay(168750); } } [/c]
Und wofür ist diese Gechichte mit if(digitalRead(8)==0) gut? Wenn das nicht der Fall ist wird nie gemessen oder serielle Ausgabe erzeugt ... LG, Sebastian
-
Thread
Geländefahrzeugsteuerung mit Arduino - Codingproblem
TIMER1_COMPA_vect) { //die Interruptroutine gibt ein Zehntel der Impulsbreite in µs zurück if (PIND & (1 << PD2)) { //Channel 1 rechts vertikal, das ist PIN D2 cnt_CH_1++; //wenn Eingang High dann Zähler inkrementieren } else if (cnt_CH_1) { //wenn Eingang Low dann
gestartet, stoppen und Wert übergeben cnt_CH_1 = 0; //Zähler zurücksetzen } if (PIND & (1 << PD4)) { //Channel 3 links vertikal, das ist PIN D4 cnt_CH_3++; //wenn Eingang High dann Zähler inkrementieren } else if (cnt_CH_3) { //wenn Eingang Low dann
-
Thread
5 Tasten am ADC
0x0045) {t = 0x31;} if (adc1_o <= 0x0040) {t = 0x4c;} //left if (adc1_o <= 0x0038) {t = 0x36;} if (adc1_o <= 0x0035) {t = 0x35;} if (adc1_o <= 0x0030) {t = 0x34;} if (adc1_o <= 0x002D) {t = 0x55;} //up if (adc1_o
) {t = 0x35;} if (adc1_o <= 0x0030) {t = 0x34;} if (adc1_o <= 0x002D) {t = 0x55;} //up if (adc1_o <= 0x0029) {t = 0x47;} //deal if (adc1_o <= 0x0025) {t = 0x39;} if (adc1_o <= 0x0021) {t = 0x38;} if (adc1_o
-
Thread
C - linux - raw-socket - recvfrom liefert daten wo keine sein sollten
#include <sys/socket.h> #include <netinet/ether.h> #include <linux/if.h> #include <linux/if_packet.h> #include <linux/if_ether.h> #include <arpa/inet.h> #define BUF_SIZ 2048 int rawrsockfd; int sockopt; static char dev_name[20];
include <stdio.h> #include <string.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <linux/if_packet.h> #include <linux/if_ether.h> #include <arpa/inet.h> #include <net/if.h> // if_nametoindex /* gcc socket_read.c -o socket_read blockierendes/nicht-blockierendes lesen von einem
-
Thread
Wittig(welec) DSO W20xxA Hardware (Teil 2)
So sollte man keine HDL Code schreiben. Eine Registerbeschreibung hat immer so auszusehen! if (reset_n == 0) begin x = 0; ... end else begin if (y == 0) x++; else if (...) begin ... end end end VHDL: if reset_n = '0' then x <= 0; elsif rising_edge(clk) then if (x != 0) then x <= x +1; elsif (...) then ... end if; end if; Und das was sicher am meisten bringen wird. 164 if (next_planeaddress) 165 begin 166 load_address <= RAM_Base_Address
-
Thread
AVR für wenig Geld im LAN
== mm1 ) { PORTD |= (1 << PD4); // ein } } if ( hh == hh2 ) { if ( mm == mm2 ) { PORTD &= ~(1 << PD4); // aus } } } // -> if ss == 05 ----- Gruß RoBue
if ( subzero ) ow_array[i] *= (-1); if (ow_array[i] < ow_arraymin[i]) { ow_arraymin[i] = ow_array[i]; } if (ow_array[i] > ow_arraymax
-
Thread
Bitte um Hilfe bei Code-Optimierung
Hallo, das Umformulieren von swith in if...else ergab folgendes: Der Switch vom mode auf die enum-Werte ergab 4 Byte *Einsparung* bei if...else, der Switch von z.B. h0 auf 12 mögliche Werte ergab einen *Mehrverbrauch* von 8 Byte. Am Meisten
bisschen die Quellen zu tunen... Santiago m. H. wrote: > Hallo, > > das Umformulieren von swith in if...else ergab folgendes: > [...] > Mein Fazit: > Also die Verwendung von if...else macht somit nur in Einzelfällen Sinn > und die Einsparung ist nicht so groß, dass sich die "Verunstaltung" des >
-
Thread
AVR Synthesizer mit ATxmega128A1
vb.net mache ich das so: [code] vtmp = v + incr If v And &H1000000 Then sample = 1 Else sample = -1 End If If (v Xor
(&(wav_res_sine[phase_2 >> 8])); if (shape == OSC_ZPULS_PK) { carrier >>= 1; carrier += 128; } uint8_t window = 0; if (phase_integral < 0x4000) { window = 255; } else if (phase_integral
-
Thread
c++ Code langsam
64], *p; int c, i; field[i = 0] = p = buf; while ((c = getchar()) != EOF) if (c == ';') { *p++ = 0; if (i < sizeof(field)/sizeof(*field) - 1) field[++i] = p; } else if (c != '\n') { if
while (getline (&line2, &len, fp) != -1) { n = 0; if (len > 43) for (char *p = strtok (line2, ";"); p; p = strtok (NULL, ";")) { if (n < 4) fprintf (fp2,"%s;", p); else if (n > 3 && n < 42) {
-
Thread
Schaltnetzteil läuft erst nach mehrmaligen einstecken des Netzes an
Am NCP1203 liegt eine Spannung von DC 310V zwischen Pin 4 und Pin 8 sowohl wenn er sich nicht einschalten lässt und wenn ich es nach ca. 20x Netzstecker ziehen schaffe das er angeht und Ihn dann in Stby versetze. Wenn er Eingeschaltet ist
Paul K. schrieb im Beitrag #5181341: > Am NCP1203 liegt eine Spannung von DC 310V zwischen Pin 4 und Pin > 8 > sowohl wenn er sich nicht einschalten lässt und wenn ich es nach ca. 20x > Netzstecker ziehen schaffe das er angeht und Ihn dann in Stby versetze. > Wenn er Eingeschaltet
-
Thread
ATMega88 Umgebungsscan
; if ((y<=Y10)&&(y>Y15)) //Abstand zwischen 10 und 15cm { // lcd_putstr("M1 "); M=1; abstand_analog = (y-C1)/(M1); //Geradengleichung } if ((y<=Y15)&&(y>Y20)) //
//=================================== //LED1 + LED2 blinken void blinken_led() { if (blink==1) //if (y=10cm) { PORTD^=((1<<PIND1)|(1<<PIND0)); } if (blink==0) { PORTD&=~((1<<PIND0)|(1<<PIND1)); } } // Ende des Programms //================
-
Thread
RFM24W Datenblatt unklar
requested information. Once the CTS is set (0xFF), the host MCU can read the answer from the radio. If the CTS is polled on the GPIOs, or the radio is configured to provide interrupt if the answer is available, then the response can be read out from the radio with the following SPI transaction. If the
the SCLK pin. The radio will provide the CTS byte on its SDO pin during the additional clock pulses. If the CTS byte is 0x00, then the response is not yet ready and the host MCU should pull up the NSEL pin and repeat the procedure from the beginning as long as the CTS becomes 0xFF. If CTS is 0xFF, then
-
Thread
Hargassner Pelletheizung Betriebsdatenerfassung
i 1 0 7 b 0 4 \n 2 u 0000020 6234 3230 310a 3169 3730 3062 0a34 7532 0000030 0 f 6 3 3 8 1 2 7 e 7 a 0 8 \n 1 0000030 6630 3336 3833 3231 6537 6137 3830 310a 0000040
Status_NANO.caption:='Fehler Aufteilung der Daten'; Status_NANO.color:=clRed; end; //try end; //If Not had_a_message end; //If Not had_a_message if not had_a_message then try // aktuelle Verbrauchswerte eintragen // Pelletsverbrauch:= Gesamtlieferung +Lageroffset-strtoint(NANO_Daten
-
Thread
Magnetic Loop Steuerung (Arduino)
if ( rotating ); if ( digitalRead(encoderPinB) != B_set ) { B_set = !B_set; // adjust counter + 1 if B leads A if ( B_set && !A_set ) StepperPos = s; //change the 1 to steps to
if ( rotating ); if ( digitalRead(encoderPinB) != B_set ) { B_set = !B_set; // adjust counter + 1 if B leads A if ( B_set && !A_set ) StepperPos = s; //change the 1 to steps to
-
Thread
Abfrage effizienter gestallten
und sichern if(!strcmp(ucTemp,"output_off")) main_token.befehl = OUTPUTOFF; //Erster Befehl entschlüsseln und sichern if(!strcmp(ucTemp,"pause")) main_token.befehl = PAUSE; //Erster Befehl entschlüsseln
Claudio Hediger schrieb im Beitrag #2007409: ein wenig besser geht es auf jeden fall [c] if(!strcmp(ucTemp,"version")) { main_token.befehl = VERSION; } else if(!strcmp(ucTemp,"output_on")) { main_token.befehl = OUTPUTON; } else if (!strcmp(ucTemp,"output_off")) { main_token.befehl
-
Thread
PIC32 Programmierung
Summenfehlerwort Internerfehler break; } if(ucData==0xFF){ //nur beim Hochlaufbit Summenfehler Bit 7 ucData=0; return; } if(ucAnzsperr==0){ //Ausgabe wird durch Programm gesperrt ucData =ucErrTab[0]; if(ucData=!0){ //Fehler vorhanden? if(ucErr==0){ //Ausgabe nur wenn noch keine Fehler aktiv war ucErr=0xFF; PORTClearBits(bCcpuErr); //Erroranzeige setzen }
-
Thread
Overflow bei add unsigned char
34 140 180 320 64 160 30 190 190 160 60 220 220 160 90 250 250 160 120 280 24 160 150 310 54 160 180 340 84 180 30 210 210 180 60 240 240 180 90 270 14 180 120 300 44 180 150 330 74 180 180 360 104 200 30 230 230 200 60 260 4 200 90 290 34 200 120 320 64 200 150
Overflow 160 30 190 190 Ok 160 60 220 220 Ok 160 90 250 250 Ok 160 120 280 24 Overflow 160 150 310 54 Overflow 160 180 340 84 Overflow 180 30 210 210 Ok 180 60 240 240 Ok 180 90 270 14 Overflow 180 120 300 44 Overflow 180 150 330 74 Overflow 180 180 360 104 Overflow 200 30 230 230
-
Thread
10W Bitcoin miner mit 450GH/s für Raspberry Pi
< 4) | ((data[1] as u16) >> 4); // // if temp_data > 2047 { // temp_data -= 4096 // } // // info!("read temp{}: {}", i + 1, temp_data); // // if i == 0 { // let mut temp1 = TEMP1.lock
@Mampf, danke habe ich nun angepasst. [c] if temp["temp"][i] > 75.0: [/c] Markus
-
Thread
Thermomix Rezeptchips
not know if this is the correct database layout. Can anyone here, that already decrypted a recipe chip, confirm if this is the correct database layout?
appreciated if you join and probably boost progress :)
-
Thread
update über LAN vor 1996
http://www.photonics.umd.edu/umd/manuals/TDS%20744A/Service%20Manual.pdf Auf S. 6–58 (254 von 310) steht es grob beschrieben, allerdings nicht im Klartext, dass es über GPIB läuft: "Digitizing oscilloscope firmware updates are easy to do. Simply install the firmware disks on your PC and follow
loading the Firmware, be sure you set the switch back to the protected position and cycle power. If you want to order a firmware update, contact your Tektronix service center." Im Programmierhandbuch könnte genaueres stehen: TDS Family (400A, 500B, 600B, and 700A) Programmer Manual (Tektronix
-
Thread
EAGLE 3D - zeigt eure Projekte Bilder
vorhanden (mind. 3 Punkte) (Flugpfad)" #end #if((global_anim=on)|(global_anim_showcampath=yes)) #declare global_anim_npoints_cam_view=0; #warning "Keine/zu wenig Animationsdaten vorhanden (mind. 3 Punkte) (Blickpunktpfad)" #end #if((global_anim=on)|(global_anim_showcampath=yes)) #end #if((global_anim_showcampath=yes)&(global_anim=off)) #end #if(global_anim=on) camera { location global_anim_spline_cam_flight(clock) #if(global_anim_npoints_cam_view>2) look_at global_anim_spline_cam_view
-
Thread
Auflösung von Kompass und Neigungssensoren
l, g, a, e, rekt, dekl, t0, sh, t, mz, rz, el, kr; double jd0, dt, la, br; double azi, elev; if(calc==0) { jd0 = ((float) (dayOfYear(time.year, time.month, time.day) + time.year * 365 + (time.year / 4) - 0.5)); dt = ((UTC_hour(time.hour,time.mesz))/ 24.0 + time.minute / 1440.0 + time.second
// Schiefe der Ekliptik rekt = atan(cos(e) * sin(a) / cos(a)); // Rektaszension if(cos(a) < 0) rekt = rekt + M_PI; dekl = asin(sin(e) * sin(a)); // Deklination t0 = jd0 / 36525.0; // Tageszahl in julianischen Jahrhunderten sh = degr(6.697376
-
Thread
FT800 / FT810 Library
= 1; } if(PrevTag == 10){ rok++; if(rok>99) rok = 19; } if(PrevTag == 15){ if(rok>19)rok--; else rok = 99; } if(PrevTag == 16){ if(miesiac
) x0 -=10; // if(PrevTag == TAG_Y0_MINUS ) y0 -=10; //&& y0 >= 10 if(PrevTag == TAG_Y0_PLUS && y0 < 600) y0 +=10; if(PrevTag == TAG_X1_PLUS && x1 < 1000) x1 +=10; if(PrevTag == TAG_X1_MINUS
-
Thread
eigenartige Warnung beim erstellen des Timing reports
of TEST is signal Di : STD_LOGIC_VECTOR(7 downto 0); begin process (CLK,RESET) begin if RESET = '0' then Di <= (others => '0'); elsif CLK = '1' and CLK'event then Di <= not Di; end if; end process; O <= to_bitvector(std_logic_vector(Di)); end VERHALTEN
erstelle (generate Timing) bekomme ich zwei Warnungen die ich mir nicht erklären kann: WARNING:Cpld:310 - Cannot apply TIMESPEC TS1000 = PERIOD:PERIOD_CLK:0.000 nS WARNING:Cpld:2 - Cannot apply TIMESPEC AUTO_TS_F2F = Wenn ich anstatt "Di <= not Di;" ersatzweise "Di <= Di + 1;" einsetze bekomme ich
-
Thread
Jitter in ISR von Atmega
Spontan fällt mir als Grund nur ein, wie der switch-case implementiert wird. Auf dem AVR wird er als "if", also als Vergleich, implementiert. und je nachdem in welchen Case du hineinspringst müssen davor unterschiedlich viele vergleiche durchgeführt werden, was zu einer Laufzeitveränderung führt. Springt
st Z, r24 TCCR1B |= (1<<CS11); // Prescaler 8 30e: 80 81 ld r24, Z 310: 82 60 ori r24, 0x02 ; 2 312: 80 83 st Z, r24 [/avrasm]
-
Thread
Retro Fieber: Z80 oder 68000 ?
. (Deshalb klammere ich immer alles, auch wenn es nur ein Statement unter einem if ist).
search_code_end() { _Bool hit; uint16_t i; i = 0; hit = false; do { if (ram[i]=='$') if (ram[i+1]=='E') if (ram[i+2]=='O') if (ram[i+3]=='C') hit = true; i++; } while (!hit || (i > 0xF000));
-
Thread
Transistortester mit AVR Gesperrt
the hfe manually, if necessary.
misser wrote: > I ask if it is possible to modify the ( Line 1110): > ====> if((HighPin == cb) && (LowPin == ca)) return; > with this line: > ====> if(PartFound == PART_CAPACITOR) goto end; > Thanx... Yes, this
-
Thread
Speicherfehler im BlockRAM
XBus_Source_IM = ProcRAM_WR then ... elsif XBus_Source_IM = ExtRAM_WR then .... end if; [/vhdl] Nicht, dass der Synthesizer hier tatsächliche eine "Logikkette" macht...
block RAM address and write enable pins must not be violated.Violating the address setup time (even if write enable is Low) will corrupt the data contents of the block RAM."
-
Thread
Wofür gilt der sichere Vcc-Bereich beim Atmega328
Das habe ich auch gelesen, aber an diversen Stellen gibt es eine Fußnote die da lautet: If 8 MHz frequency exceeds the specification of the device (depends on VCC), the CKDIV8 Fuse can be programmed in order to divide the internal frequency by 8. It must be ensured that the resulting divided
Hallo Chefkoch! Steht im ausführlichen Datenblatt auf Seite 310 (Speed Grades). Bei 3.3 V geht der Mega328 bis 13.33.. Mhz.
-
Thread
Solar Einspeisewandler für 230V direkt an Batterie betreiben
Wechselrichter für 40$ ?!? nicht schlecht ?!? Hab seit oktober drei in betrieb. 24/7. Bringen je 310W AC leistung, muss gekühlt werden. Hab einen 120mm PC lüfter mit temp. steuerung drauf.
300/350W modelle unterscheiden sich nur durch eine interne poti einstellung. Die 300 und 350 liefern 310W AC, der 250W liefert 290W AC. Die unter 180W sind die 12V versionen! PDaddy schrieb im Beitrag #6997466: > diesen Warnhinweiß Der hinweis ist quatsch. Ich hab auch am am 250W ganze 660WP
-
Thread
Merkwüdiger Fehler: Mal fehlt powl, mal nicht
} }; long double calc_power (const long double y) { if (y < ald_2ghzband[1][0]) { return 2; /////////////////////////////////////////////////////// } return 0; } int main (int argc, char *argv[]) { long double y = 0, u = 0, v = 0; char **endptr = &(argv[1]) + 10; if (argc < 2) return (-1); y = strtold (argv[1], endptr); u = calc_power (y); u += 20.0; v = powl (10.0, u / 10.0); printf ("%.2Lf %.1Lf %.1Lf\n", y, v, u); return
-
Thread
MSP Flash Infomemory benützen
Infomemory angewandt werden. Zitat aus dem "MSP430x4xx Family User's Guide (Rev. F)*", Seite 6-4 (310) Reading or writing to flash memory while it is being programmed or erased is prohibited. If CPU execution is required during the write or erase, the code to be executed must be in RAM.
from within flash memory, it is possible to erase the code needed for execution after the erase. If this occurs, CPU execution will be unpredictable after the erase cycle.
-
Thread
Wickenhäuser: Error: integer expression must be constant
C8051F300.def 18.04.2005 00:04 12.111 c8051F300.h 17.04.2005 21:58 15.206 C8051F310.def 18.04.2005 00:04 16.042 c8051F310.h 17.04.2005 21:59 15.210 C8051F320.def 18.04.2005 00:04 16.677 c8051F320.h 17.04.2005 22:01 9.277 C8051F330
[c] int read_val(const int* length) { int rv=-1; char* input; input=malloc(length); if (input) { inputse(input, length); rv=atoi(input); free(input); } return rv; } [/c] So ist es in richtigem C gedacht. fchk
-
Thread
ESP-Baseboard auf Proto-Shield
//Rotate LCD TM_ILI9341_Rotate(TM_ILI9341_Orientation_Portrait_2); //Initialize Touch if (TM_STMPE811_Init() != TM_STMPE811_State_Ok) { TM_ILI9341_Puts(20, 20, "STMPE811 Error", &TM_Font_11x18, ILI9341_COLOR_ORANGE, ILI9341_COLOR_BLACK); while (1); } //Select touch
"Press on LCD", &TM_Font_11x18, ILI9341_COLOR_ORANGE, ILI9341_COLOR_BLACK); TM_ILI9341_Puts(93, 310, "stm32f4-discovery.com", &TM_Font_7x10, ILI9341_COLOR_GREEN, ILI9341_COLOR_BLACK); while (1) { if (TM_STMPE811_ReadTouch(&touchData) == TM_STMPE811_State_Pressed) { //Touch valid
-
Thread
PIC18-Projekt restartet unerklärlich
@kein Name: Hm, also wenn ich mit den folgen Zeilen: if (RCONbits.BOR == 0) { RCONbits.BOR = 1; } den PIC debugge, springt er nach der 16. LED (also wenn alle wieder ausgehen) in diese Zeile, was ja bedeutet, dass die Spannung eingebrochen ist
285mA (laut meinem PeakTech 1890-Netzteil). Bei der 17. LED wären es dann also ein bisschen mehr als 310mA. Die Flächen für die Versorgungsspannung und GND auf der Platine sind auch mehr als Großzügig angelegt... @holger: die Config-Änderung ergab leider keine Lösung. Selbst wenn ich die Brown-Out-Resetspannung
-
Thread
AVR-ChipBasic2 - BASIC-Computer mit ATMega 644
GOSUB 37 20 IF S=1 THEN N=(N+2)&3:GO 26 21 IF (N=0) & (R=1) THEN GO 26 22 IF (N=2) & (L=1) THEN GO 26 23 IF (N=1) & (D=1) THEN GO 26 24 IF (N=3) & (U=1) THEN GO 26 25 GOSUB 37: GO 18 26 IF N=0 THEN DA A+1,AR(A+1)+1 27 IF N=1 THEN DA A,AR(A)+1 28 IF N=2 THEN DA A+1,AR(A+1)-1 29 IF N=3 THEN DA A,AR(A)-1 30 DA A+2,N:NEXT 31 IF G>0 THEN G=G-1 32 COLOR 7,0:? @0,10;"Punkte:";P 33 SYNC 3: IF Q=1 THEN GO 35 34 GO 3 35
-
Thread
MSP430 Gleitkommazahl in Flash speichern
value); int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer if (CALBC1_1MHZ==0xFF) // If calibration constant erased { while(1); // do not load, trap CPU!! } DCOCTL = 0; // Select
value); int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer if (CALBC1_1MHZ==0xFF) // If calibration constant erased { while(1); // do not load, trap CPU!! } DCOCTL = 0; // Select
-
Thread
LTspice & LM5118 Simulation fehlerhaft
Daten her machen :-) . Mir ist eben auch aufgefallen, dass Vcc nicht kommt und bin dann aufgrund der If Statements stutzig geworden. Welche Diodenmodelle meinst du ? Gruß Mathias
> Welche Diodenmodelle meinst du? S310
-
Thread
Unbenutzte AVR-Pins wie beschalten (EMV)?
Das Datenblatt sagt: [code] Unconnected Pins If some pins are unused, it is recommended to ensure that these pins have a defined level. Even though most of the digital inputs are disabled in the deep sleep modes as described above, floating inputs
currents if the pin is accidentally configured as an output.[/code] Ok, Pull-up aktivieren bedeutet dann wohl, man soll den PIN auf Eingang schalten, sonst gibt es ja keinen definierten Pegel. Wird der Pull-up
-
Thread
WiFi Relais mit ESP8266 ESP-01 Modul (Bascom)
Not-Abschaltung If Pina.7 = 0 Then Waitms 50 If Pina.7 = 0 Then Reset Porta.5 Reset Portb.2 If Savevalues = 1 Then Eepromchar = 0
If Uartchar > 0 Then Uartstring = Uartstring + Chr(uartchar) End If Loop Until Len(uartstring) > 12 Uartstring = Ucase(uartstring) If Instr(uartstring , "REL=?") > 0 Then
-
Thread
Allgemeine Frage Diode : "Durchlasswiderstand"
ausführlich für dyn. udn statisch (= Prüfungsfrage) dargestellt: https://riverglennapts.com/diode/310-diode-resistance.html
meinst du den Wärmewiderstand ;-))? Entscheidend für die Kühlung ist die Verlustleistung P=Uf·If. Uf und If sind im Gegensatz zum Durchlasswiderstand beides gängige Größen, zu denen auch Informationen im Datenblatt zu finden sind. Da braucht es den Umweg über den (stark von If und erst recht
-
Thread
BLDC Sinuskommutierung Ansteuerung H-Brücke
dU); n2=(IMAX-(IMAX/4+1)-dV); n3=(IMAX-(IMAX/4+1)-dW); /* // Begrenzung der Werte if (n1<0) n1=0; if (n2<0) n2=0; if (n3<0) n3=0; if (n1 > (1<<BITS)) n1=(1<<BITS); if (n2 > (1<<BITS)) n2=(1<<BITS); if (n3 > (1<<BITS)) n3=(1<<BITS); */ pM->dU=n1; pM->dV=n2; pM
Induktivität in Serie zur Motorenwicklung etwas? Ich würde mal 3x100uH Versuchen, der Motor hat ja 310uH. Gruss
-
Thread
GCC optimiert 32bit Bitoperationen schlecht/gar nicht?
\ do { \ if (ai_##OP##_##N (X) != ni_##OP##_##N (X)) __builtin_abort(); \ if (ai_##OP##_##N (X) != ni_f##OP##_##N (X)) __builtin_abort(); \ if (ai_##OP##_##N (X) != ni_0##OP##_##N (0, X)) __builtin_abort
avr_rtx_costs_1() case ASHIFT: [...] case QImode: [...] val = INTVAL (XEXP (x, 1)); [...] else if (val >= 0 && val <= 7) *total = COSTS_N_INSNS (val); [/c] Hier fangen aber die Probleme an: TARGET_RTX_COSTS wird in einem anderen Kontext (und viel früher) aufgerufen als die Erzeugung des Codes
-
Thread
Minutengenaue 24 Stunden-Wortuhr - wer will mitbauen?
if (b < 11) return 7; if (b < 15) return 8; if (b < 19) return 9; if (b < 23) return 10; if (b < 29) return 11; if (b < 35) return 12; if (b < 41) return 13; if (b < 48) return 14; if (b < 56) return 15; if (b < 64) return 16; if (b < 72) return 17; if (b < 82) return 18; if (b < 92) return 19; if (b < 102) return 20;
-
Thread
Bitmanipulation beschleunigen
1] += 0xF0; } if (in&0x10){ result.array[2] += 0x0F; } if (in&0x20){ result.array[2] += 0xF0; } if (in&0x40){ result.array[3] += 0x0F; } if (in&0x80){ result.array[
machen: [c]#include <stdint.h> uint32_t variant5 (uint8_t in) { uint32_t out = 0; if (in & (1u << 0)) out |= 0xful << (4*0); if (in & (1u << 1)) out |= 0xful << (4*1); if (in & (1u << 2)) out |= 0xful << (4*2); if (in & (1u << 3)) out |= 0xful << (4*3); if (in & (