Suchergebnisse für "portc"
Thread
1<<PINC4)) { while(dezimalzahl >= 1) { -- dezimalzahl; PORTC = 0x20; _delay_ms(100); PORTC = 0x00 ; _delay_ms(100); } } //PORTC &=(1 << PC5); // } return 0; } Kann mir jemand weiterhelfen? Grüße
Mikrocontroller und Digitale Elektronik
· Zi Ppo
· 05.12.2015 14:57
· 14 Antworten
ifdef USE_soft_spi /* unsigned char i; cbi(PORTD, CS); for (i=0; i<16; i++) { if (wert&32768) sbi(PORTC , SDI); else cbi(PORTC , SDI); wert<<=1; if (PINC&(1<<SDO)) wert|=1; sbi(PORTD, SCK); asm("nop"); asm("nop"); cbi(PORTD, SCK); } sbi(PORTD, CS); return wert; */ unsigned short werti=0; unsigned char i; cbi(PORTD, CS); for (i=0; i<16; i++) { if (wert&32768) sbi(PORTC , SDI); else cbi(PORTC , SDI); werti<<=1; if (PINC&(1<<SDO)) werti|=1; sbi(PORTD, SCK); wert<<=1; asm("nop"); asm("nop"); cbi(PORTD, SCK); } sbi(PORTD, CS); return werti; #else CONVERTW val; val.w=wert
in
„ST32F103 ---> AVR RFM12B“
·
Mikrocontroller und Digitale Elektronik
·
01.12.2015 12:10
Thread
die Zeichen, die ausgegeben werden sollen erscheinen auch nicht. Das Display wird im 8 Bit modus an PORTC betrieben. PORTC ->Data PA0->RS PA1->RWT PA2->EN Ich verwende folgendes Datenblatt http://www.winstar.com.tw/UserFiles/downloads/13511323500823064564.pdf Init auf Seite 11 Source Code
(1<<PA2); } void vLCDPutCommand(uint8_t _ui8Command){ PORTA &= ~((1<<PA1) || (1<<PA0)); PORTC = _ui8Command; vLCDEnable(); } void vLCDPutChar(char _cZeichen){ PORTA &= ~(1<<PA1); PORTA |= (1<<PA0); PORTC = _cZeichen; vLCDEnable(); } [/c] Grüße Hubba
Mikrocontroller und Digitale Elektronik
· Hubba
· 01.12.2015 22:43
· 11 Antworten
Thread
alle Ports/Pins für LEDs Config Portb = Output Config Portd = Output '1. LED (CC) Config Portc .2 = Output 1r Alias Portc .2 Config Portc .4 = Output 1g Alias Portc .4 Config Portc .5 = Output 1b Alias Portc .5 '2. LED (CC) 2r Alias Portb.5 Config Portc .1 = Output 2g Alias Portc .1
b00000010 ' toggle bit 1 > > PortC = var ' write back portC > [/c] Warum mit var und nicht gleich PORTC = PORTC and &b11110111 ' clear bit 3 etc
Mikrocontroller und Digitale Elektronik
· neuling
· 26.11.2015 20:36
· 18 Antworten
Thread
PORTA = 0b00000000; DDRA = 0b00000000; PORTB = 0b00000000; DDRB = 0b00000000; PORTC = 0b00000000; DDRC = 0b00000000; PORTD = 0b00000000; DDRD = 0b00000100; // PD0=INT0 Als Input um Hardware-Interrupt zu erzeugen PD2 als ZündOutput PORTE = 0b00010000; DDRE =
Mikrocontroller und Digitale Elektronik
· Mechatronk
· 01.12.2015 15:56
· 6 Antworten
Thread
hier muss auch was mit Index her, ANPASSEN [/c] Hier ist gerade das Problem. Weil: [c] /* VL0 PORTC PC3 */ #define setVL0 (PORTC |= (1<<PC3)) #define resVL0 (PORTC &= ~(1<<PC3)) /* VL1 PORTC PC2 */ #define setVL1 (PORTC |= (1<<PC2)) #define resVL1 (PORTC &= ~(1<<PC2)) /* VL2 PORTC PC1 */ #define setVL2 (PORTC |= (1<<PC1)) #define resVL2 (PORTC &= ~(1<<PC1)) /* VL3 PORTC PC0 */ #define setVL3 (PORTC |= (1<<PC0)) #define resVL3 (PORTC &= ~(1<<PC0)) /* VL4 PORTB PB2 */ #define setVL4 (PORTB |= (1
Mikrocontroller und Digitale Elektronik
· Maxim B.
· 27.11.2015 22:40
· 44 Antworten
Alias Portd.7 Config Led_green = Output Config Led_blue = Output 'Data line Linx RF Data_cmd Alias Portc .3 Config Data_cmd = Output Data_cmd = 1 'RTS BLE112 Rts_ble112 Alias Pind.2 Config Rts_ble112 = Input 'Connect BLE112 Connect_ble112 Alias Pinb.0 Config Connect_ble112 = Input Declare Sub Set_sleepmode_rf
in
„Probleme mit 20Mhz Resonator am ATmega328“
·
Mikrocontroller und Digitale Elektronik
·
18.11.2015 22:50
PMIC_HILVLEN_bm; @@ -824,7 +835,7 @@ USARTC1.CTRLC = USART_CHSIZE_8BIT_gc; //Größe der Zeichen: 8 Bit PORTC .DIR |= (1<<7); //TXD als Ausgang setzen PORTC .DIR &= ~(1<<6); - + #else #if (IRMP_EXT_LOGGING == 0) // use UART @@ -871,6 +882,9 @@ USART_SendData(STM32_UART_COM, '\r'); } +#elif defined(ARDUINO) +
in
„IRMP - Infrared Multi Protocol Decoder“
·
Projekte & Code
·
17.11.2015 12:11
Thread
**************************************** void zaehler_auswerten(void) { if (PORTC .PIN3CTRL==PORT_ISC_FALLING_gc) { perioden_dauer = TCC0.CNT; TCC0.CNT= 0; zaehler=true; } } **************************************** ISR(PORTC _INT0_vect) // interrupt fuer I/O Port { cli(); zaehler_auswerten(); interrupt=true;
Mikrocontroller und Digitale Elektronik
· Mido
· 16.11.2015 15:47
· 6 Antworten
void); ISR (TCC0_OVF_vect) { if (interrupt) { TCC0.CNT=0 ; } } void zaehler_auswerten(void) { if (PORTC .PIN3CTRL==PORT_ISC_FALLING_gc) { //perioden_dauer = (int) round(TCC0.CNT * zeit_in_us); perioden_dauer = TCC0.CNT; TCC0.CNT= 0; zaehler=true; } } ISR(PORTC _INT0_vect) // interrupt f?r I/O Port { cli
in
„Problem beim SENT Signal, Message werden nicht richtig ausgelesen ATxmega256a3“
·
Mikrocontroller und Digitale Elektronik
·
14.11.2015 04:49
Thread
Ucsr0b.txen0 = 0 Ucsr0b.rxen0 = 0 Ddrd = &B0011_0011 Portd = &B1100_0000 Ddrc = &B0011_1111 Portc = &B1100_0000 Do Waitms 1 Loop Besten Dank
Mikrocontroller und Digitale Elektronik
· Robert S.
· 14.11.2015 11:40
· 11 Antworten
PortB Bit1 = not used .equ PrtB0 = 0 ; PortB Bit0 = not used ; Port C connections: .equ PrtC7 = 7 ; PortC Bit7 = not used .equ DP = 6 ; PortC Bit6 = output store decimal point active low .equ ONE = 5 ; PortC Bit5 = output leading "one" digit .equ KILO = 4 ; PortC Bit4 = output "k"Hz digit .equ DB3 = 3 ; PortC Bit3 = output LCD-databus Bit 3 .equ DB2 = 2 ; PortC Bit2 = output LCD-databus Bit 2 .equ DB1 = 1 ; PortC Bit1 = output LCD-databus Bit 1 .equ DB0 = 0 ; PortC Bit0 = output LCD-databus Bit 0 ; Port
in
„32Bit Division mit inline Assembler“
·
Mikrocontroller und Digitale Elektronik
·
12.11.2015 21:52
Thread
ausgebaut und versuche damit 2 Srittmotoren anzusteuen. 1. Minebea 17PKM-K320 6 Pol Anschluss (CN2) an PortC 2. J60B13AT(k.a. von wem) 6 Pol. Anschlusss (CN3) an PortD Wenn ich jetzt beide Motoren dran habe funktioniert der an PortC einwandfrei, der an PortD bewegt sich nur hin und her. Wenn ich den
interrupt.h> int main(void) { DDRD=0b00011111; DDRC=0b00011111; while (1) { int MS; MS=400; PORTC =0b00000101; PORTD=0b00000001; _delay_ms(MS); PORTC =0b00000110; PORTD=0b00000010; _delay_ms(MS); PORTC =0b00001010; PORTD=0b00000100; _delay_ms(MS); PORTC =0b00001001; PORTD=0b00001000; _delay_ms
Mikrocontroller und Digitale Elektronik
· Niko Be
· 10.11.2015 20:34
· 6 Antworten
int main(void) { uint8_t i; InitClock(); PORTF.DIR = 0xff; // Port F als Ausgang PORTF.OUT = 0xff; PORTC .DIRSET = PIN3_bm; PORTC .DIRCLR = PIN2_bm; USARTC0.CTRLA = 0b00001000; USARTC0.CTRLB = 0b00011001; USARTC0.CTRLC = 0b00000011; USARTC0.BAUDCTRLA = F_CPU/((16*9600)-1); USARTC0.BAUDCTRLB = 0; while(1
in
„XMega UART: Probleme bei der Ausgabe“
·
Mikrocontroller und Digitale Elektronik
·
10.11.2015 12:10
Thread
BTFSC PORTA, 0x5 03B1 1E05 BTFSS PORTA, 0x4 03B2 2BB8 GOTO 0x3B8 03B3 1A87 BTFSC PORTC , 0x5 03B4 1E07 BTFSS PORTC , 0x4 03B5 2BB8 GOTO 0x3B8[/c] und gewinnt mit 6 Befehlen 25% Land. Natürlich könnte ich solche Tricks selbst in ASM nutzen und sie mit Prosa umschreiben. Aber
Offtopic
· Moby AVR
· 09.11.2016 14:10
· 2087 Antworten
Thread
$crystal = 5120000 'Quartzoszillator 'Display-Konfiguration Config Lcdpin = Pin , Db4 = Portc .1 , Db5 = Portc .2 , Db6 = Portc .3 , Db7 = Portc .4 , E = Portc .5 , Rs = Portd.0 Config Lcd = 16 * 2 'Display-Typ Dim Ganzzahl As Integer Dim Kommazahl As Single Dim Ee_ganzzahl
Mikrocontroller und Digitale Elektronik
· Tilmann W.
· 13.12.2015 15:18
· 13 Antworten
if(akt_pos == stunden_lut[stunde]) { stundenzeiger = 0x3F; } // Zuordnen PORTB = sekundenzeiger; PORTC = minutenzeiger; PORTD = stundenzeiger; // Wartezeit TCNT2 = blink_zeit; while(TCNT2 != 0) { } // Rücksetzen PORTB = 0x00; PORTC = 0x00; PORTD = 0x00; } } } void init() { // Ausgänge festlegen DDRC
in
„Kontroller erkennt Variablenwertänderung nicht“
·
Mikrocontroller und Digitale Elektronik
·
08.11.2015 21:05
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT1 als Eingang PORTD |= (1<<PD3); //Pull-up einschalten EIMSK
in
„RFM12b an Atmega168 - Empfangsprobleme“
·
Mikrocontroller und Digitale Elektronik
·
06.11.2015 23:01
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT 1 als Eingang PORTD |= (1<<PD3); // Pull up aktivieren EIMSK
in
„RFM12b an Atmega168 - Empfangsprobleme“
·
Mikrocontroller und Digitale Elektronik
·
06.11.2015 23:01
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT1 als Eingang PORTD |= (1<<PD3); //Pull-up einschalten EIMSK
in
„RFM12b an Atmega168 - Empfangsprobleme“
·
Mikrocontroller und Digitale Elektronik
·
05.11.2015 22:25
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT 1 als Eingang PORTD |= (1<<PD3); // Pull up aktivieren //EIMSK
in
„RFM12b an Atmega168 - Empfangsprobleme“
·
Mikrocontroller und Digitale Elektronik
·
05.11.2015 22:24
Thread
reset the DDS circuitry. */ SPCR = 0; PORTC |= _BV(0); PORTC &= ~_BV(0); /* * After reset, initiate one W_CLK pulse followed by one FQ_UD pulse * to activate the serial configuration control word. */ PORTB |= _BV(7); PORTB &= ~_BV(7); PORTC |= _BV(1); PORTC &= ~_BV(1); /* * Now, we're ready to hand over the data transmission to SPI. */ SPCR = _BV(SPE) | _BV(DORD) | _BV(MSTR); SPSR = _BV(SPI2X); } [/c] Kann es
Mikrocontroller und Digitale Elektronik
· MN
· 08.11.2015 12:12
· 60 Antworten
Thread
einwandfrei ausschließlich das auslesen nicht. [code] DDRA |= (1 << PA0); DDRC &= ~(1 << PC1); PORTC &= ~(1 << PC1); while(1) { if((PINC & (1 << PC1))){ PORTA |= (1 << PA0); //tracking(); _delay_ms(250); PORTA &= ~(1 << PA0); _delay_ms(250); } } [/code]
eingebauten Pullup Widerstand benutzen. Nur Dazu müsste der auch eingeschaltet werden ... [c] PORTC &= ~(1 << PC1); [/c] ... was er jetzt aber nicht ist, und die Abfrage .... [c] if((PINC & (1 << PC1))){ [/c] ... würde dann genau anders herum lautet (weil ein gedrückter Taster dann ja eine
Mikrocontroller und Digitale Elektronik
· Felix
· 04.11.2015 23:42
· 5 Antworten
Thread
DDRD = 0; // inputs // turn on pullups on all inputs PORTB = 0b11011111; PORTC = 0xFF; PORTD = 0xFF; } int main(void) { init_io(); while (1) { PORTB |= 0b00100000; _delay_ms(100);
Mikrocontroller und Digitale Elektronik
· P. M.
· 12.11.2015 19:55
· 81 Antworten
nicht anzeigen } void cap_button (void) { if (PIND & 0x04) { long_delay (40); if (!(PINC & 0x04)) { PORTC = 0xF7; out = 0; } else if (!(PINC & 0x08)) { PORTC = 0xEF; out = 1; } else if (!(PINC & 0x10)) { PORTC = 0xDF; out = 2; } else if (!(PINC & 0x20)) { PORTC = 0xBF; out = 3; } else if (!(PINC & 0x40)) { PORTC = 0x7F; out = 4; } else if (!(PINC & 0x80)) { PORTC = 0xFB; out = 5; } } } void ADC_Init (void) { ADMUX = (1<<REFS0)|(1<<ADLAR); ADCSRA = (1<<ADPS2)|(1<<ADPS0); ADCSRA |= (1<<ADEN); ADCSRA |= (1<<ADSC
in
„AD-Wandler im ATmega8535“
·
Mikrocontroller und Digitale Elektronik
·
03.11.2015 21:00
Thread
// PortB alles als Ausgang DDRC |= (1 << DDC0) | (1 << DDC1) | (1 << DDC2); // PortC 0..2 als Ausgang PORTC |= (1 << PC0) | (1 << PC1) | (1 << PC2); // 0..2 High = Digits aus OCR1A = (uint16_t)(F_CPU/1024.0*0.005); // Vergleichwert für 0,005s laden: Takt= 8MHz/1024
zahl_ausgeben (i); delay_ms (100); } } return 0; } ISR (TIMER1_COMPA_vect) { PORTC |= (1 << PC0) | (1 << PC1) | (1 << PC2); // 0..2 High = Digits aus switch (position) // Aktuelle Stelle ausgeben { case 0 : digit (hunderter, PC0); break; case 1 : digit (zehner
Mikrocontroller und Digitale Elektronik
· Markus G.
· 04.11.2015 13:15
· 10 Antworten
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT1 als Eingang PORTD |= (1<<PD3); //Pull-up einschalten EIMSK
in
„RFM12b an Atmega168 - Empfangsprobleme“
·
Mikrocontroller und Digitale Elektronik
·
01.11.2015 22:00
date if flash and memory space allows. #define COOLANT_FLOOD_DDR DDRC #define COOLANT_FLOOD_PORT PORTC #define COOLANT_FLOOD_BIT 3 // Uno Analog Pin 3 #ifdef ENABLE_M7 // Mist coolant disabled by default. See config.h to enable/disable. #define COOLANT_MIST_DDR DDRC #define COOLANT_MIST_PORT PORTC #
in
„Projekt: SerialComCNC Serielles Frontend für CNC GRBL mit ATMega“
·
Projekte & Code
·
01.11.2015 10:53
_2*2) ; Z-Pointer laden rcall lcd_flash_string ; Unterprogramm gibt String aus der ret DS_OK: sbi portc ,0 ret ds_romskip_conv: rcall onewire_presence ldi temp1,0xCC ;skip rom rcall onewire_data_write ldi temp1,0x44 ;convert T rcall onewire_data_write sbi DS_DDR,DS18b20 Sbi DS_Port,DS18b20 rcall delay
in
„ds18s20 atmega16 asm“
·
Mikrocontroller und Digitale Elektronik
·
31.10.2015 20:52
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;;ATMEGA16 16MHZ LCD an PortB,DS18S20 an PD7, Led an PORTC 0=DSpresent ok ;; ;; Led an PORTC 1=Blinkt ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .org $0000 ;RESET HANDLER rjmp init .def temp = r16 .def temp1 =
in
„ds18s20 atmega16 asm“
·
Mikrocontroller und Digitale Elektronik
·
31.10.2015 20:52
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT1 als Eingang PORTD |= (1<<PD3); //Pull-up einschalten EIMSK
in
„RFM12b an Atmega168 - Empfangsprobleme“
·
Mikrocontroller und Digitale Elektronik
·
31.10.2015 13:20
(1<<PD4) | (1<<PD2)); DDRC |= (1<<PC2); //PB4 als Ausgang -> Senden/Empfangen PORTD &=~ (1<<PD2); PORTC &=~ (1<<PC1); PORTC &=~ (1<<PC2); PORTC &=~ (1<<PC3); PORTC &=~ (1<<PC4); PORTC &=~ (1<<PC5); PORTD &=~ (1<<PD4); DDRD &= ~(1<<PD3); //INT 1 als Eingang PORTD |= (1<<PD3); // Pull up aktivieren EIMSK
in
„RFM12b an Atmega168 - Empfangsprobleme“
·
Mikrocontroller und Digitale Elektronik
·
31.10.2015 13:19
Thread
nicht warum ich immer nur 0xF0 bekomme,scheinbar läuft die reset prozedur durch ,da die led Leuchtet(PORTC ,0). Ich habe vergessen zu sagen das ich wenig Programmierkenntnisse habe und die auch nur in Assembler.
Mikrocontroller und Digitale Elektronik
· andre
· 01.11.2015 09:23
· 18 Antworten
laden rcall lcd_flash_string ; Unterprogramm gibt String aus der ret DS_OK: sbis Pind,7 rjmp pc-1 sbi portc ,0 ret ds_romskip_conv: rcall onewire_presence ldi temp1,0xCC ;skip rom rcall onewire_data_write ldi temp1,0x44 ;Convert T rcall onewire_data_write sbi DS_DDR,DS18b20 Sbi DS_Port,DS18b20 rcall delay
in
„ds18s20 atmega16 asm“
·
Mikrocontroller und Digitale Elektronik
·
31.10.2015 13:07
Thread
define PB6 GPIO(GPIO_PORTA, 27) #define PB7 GPIO(GPIO_PORTA, 28) // Bug Atmel Start? /* PORTC */ #define PC0_TX GPIO(GPIO_PORTA, 16) #define PC1_RX GPIO(GPIO_PORTA, 17) #define PC2 GPIO(GPIO_PORTA, 18) #define PC3 GPIO(GPIO_PORTA, 19) #define PC4_SS GPIO(GPIO_PORTA,
Mikrocontroller und Digitale Elektronik
· Stefan S.
· 29.10.2015 08:53
· 7 Antworten
Off // Pin6 Pin Change interrupt 1: Off // Pin7 Pin Change interrupt 1: Off PORTB.INT1MASK=0x00; // PORTC initialization // OUT register PORTC .OUT=0x08; // Pin0: Input // Pin1: Input // Pin2: Input // Pin3: Output // Pin4: Output // Pin5: Input // Pin6: Input // Pin7: Input PORTC .DIR=0x18; // Pin0 Output
in
„Codevision CodeWizardAVR TWI Probleme“
·
Mikrocontroller und Digitale Elektronik
·
26.10.2015 11:55
anzeigen } int main (void) { // DDRA = 0x00; // DDRB = 0xE0; // // DDRC = 0xFF; // // DDRD = 0xFB; // // PORTC = 0xFB; // init (); while(1) { hex (16, 1); hex (16, 2); hex (0, 3); long_delay (100); hex (16, 1); hex (1, 2); hex (0, 3); long_delay (100); hex (16, 1); hex (2, 2); hex (0, 3); long_delay (100);
in
„MAX7219: 3-Segment-Anzeige macht Probleme“
·
Mikrocontroller und Digitale Elektronik
·
24.10.2015 17:47
Off // Pin6 Pin Change interrupt 1: Off // Pin7 Pin Change interrupt 1: Off PORTB.INT1MASK=0x00; // PORTC initialization // OUT register PORTC .OUT=0x08; // Pin0: Input // Pin1: Input // Pin2: Input // Pin3: Output // Pin4: Output // Pin5: Input // Pin6: Input // Pin7: Input PORTC .DIR=0x18; // Pin0 Output
in
„Codevision, Xmega un IIC“
·
Mikrocontroller und Digitale Elektronik
·
23.10.2015 17:28
Thread
all output TRISA = 0; TRISB = 0; TRISC = 0; PORTA = 0; PORTB = 0; PORTC = 0; RC0 = 1; //rc0 is used to detect resets __delay_ms(1); RC0 = 0; while(1) { RC3 = !RC3; //mainloop __delay_ms(500); } } [/c]
Mikrocontroller und Digitale Elektronik
· Loisl
· 21.10.2015 00:37
· 3 Antworten
Thread
Das scheint bei dir Methode zu haben [c] else if (spi_data == 0x00) { PORTC = (0<<PC0); [/c]
Miau, /Slave Select/ schon, aber nicht vernünftig. Und da gibt's noch so eine dubiose Null: > PORTC = (0<<PC0);
Mikrocontroller und Digitale Elektronik
· Marcel D.
· 21.10.2015 19:38
· 32 Antworten
Steuerpult Formsignal-ansteuerung * '* Controller M48 ; Clock 1MHz intern * '* 6 Taster "Fahrt frei" PortC Pin0 bis 5 * '* 6 Taster "Halt" PortB Pin0 bis 5 * '* Anzeige rot/grün PortD Pin2 bis 7 * '* Schnittstelle RS232 Portd Pin0 und 1 * '* Programm GII_formsignal_M48_Master_V2 * '* Version V2.20.10.15
in
„zwei µC über UART verbinden in Bascom“
·
Mikrocontroller und Digitale Elektronik
·
20.10.2015 17:58
WDTPS = 32768 // Watchdog Timer Postscale Select bits (1:32768) // CONFIG3H #pragma config CCP2MX = PORTC 1 // CCP2 MUX bit (CCP2 input/output is multiplexed with RC1) #pragma config PBADEN = OFF // PORTB A/D Enable bit (PORTB<5:0> pins are configured as digital I/O on Reset) #pragma config CCP3MX = PORTB5
in
„MCLR funktioniert nicht als Input PIC18F23K22“
·
Mikrocontroller und Digitale Elektronik
·
20.10.2015 16:43
Thread
Zeichen auf dem Display. Der entscheidende Unterschied dürfte wirklich sein, dass der Olimex Code am PortC alle 7 LCD Leitungen auf Ausgang und 0 setzt. Dass der nur wirre Zeichen bringt, das kann jetzt an vielem liegen. Unter andermm daran [c] void Delay(unsigned int a) { while (a) {
Mikrocontroller und Digitale Elektronik
· Oliver
· 19.10.2015 18:11
· 62 Antworten
müssen auf aufeinanderfolgenden Pins liegen // LCD DB4-DB7 <--> PORTD Bit PD0-PD3 #define LCD_PORT PORTC #define LCD_DDR DDRC #define LCD_DB PC4 // LCD RS <--> PORTD Bit PD4 (RS: 1=Data, 0=Command) #define LCD_RS PC0 // LCD EN <--> PORTD Bit PD5 (EN: 1-Impuls für Daten) #define LCD_EN PC2 ////////////
in
„LCD 1602A an Atmega128A will nicht funktionieren“
·
Mikrocontroller und Digitale Elektronik
·
19.10.2015 12:28
PINB Read/write R/W R/W R/W R/W R/W R/W R/W R/W Initial value N/A N/A N/A N/A N/A N/A N/A N/A 13.4.5 PORTC – Port C Data Register Bit 7 6 5 4 3 2 1 0 PORTC 7 PORTC 6 PORTC 5 PORTC 4 PORTC 3 PORTC 2 PORTC 1 PORTC 0 PORTC Read/write R/W R/W R/W R/W R/W R/W R/W R/W Initial value 0 0 0 0 0 0 0 0 13.4.6 DDRC – Port
in
„Quarz Anbindung AtmegaXXM1“
·
Platinen
·
18.10.2015 10:25
Time$ = "00:00:00" Date$ = "15.10.15" '##### Div. Ausgänge ##### 'LCD Beleuchtung Lcdlicht Alias Portc .2 Config Lcdlicht = Output 'DP unten links Dpul Alias Portb.2 Config Dpul = Output 'DP oben links Dpol Alias Portb.3 Config Dpol = Output 'DP unten rechts Dpur Alias Portb.0 Config Dpur = Output 'DP
in
„Uhrenquarz Feineinstellung“
·
Mikrocontroller und Digitale Elektronik
·
17.10.2015 19:21
Thread
C0 legen? Bsp. 'quarz PC7 quarz Alias Pinc.7 Config quarz = Input 'Zum Oszi oszi Alias Portc .0 Config oszi = Output do oszi = quarz loop end
Mikrocontroller und Digitale Elektronik
· Christian Betzen
· 18.10.2015 18:03
· 63 Antworten
&=~(1<<REED_0); //Reed 0 DDRD &=~(1<<RFM_IRQ); //IRQ_IN //interne Pull-Up-Widerstände einschalten PORTC |= (1<<DIP1); //DIP-Schalter PORTC |= (1<<DIP2); //DIP-Schalter PORTC |= (1<<DIP3); //DIP-Schalter PORTC |= (1<<DIP4); //DIP-Schalter PORTD |= (1<<REED_0); //Reed-Kontakt //PORTD |= (1<<RFM_IRQ); /
in
„Attiny13 spring t aus Hauptschleife“
·
Mikrocontroller und Digitale Elektronik
·
15.10.2015 20:21
Thread
[c] PORTC = 1; while (1) { PORTD = codes[PINC&1]; [/c] Was haben Port *D* und Pin *C* miteinander zu schaffen? Wie sieht dein Schaltungplan dazu aus?
Mikrocontroller und Digitale Elektronik
· Kim-Yannick
· 11.10.2015 16:29
· 17 Antworten
Thread
an. [c] if(get_key_press(1<<KEY_2))// nur Taste press { // LED an PORTC &= ~(1<<PC1); } if(get_key_press(1<<KEY_3)) // nur Taste press { // LED aus PORTC |= (1<<PC1); } [/c] Verwende ich die Tasterentprellung von Peter, ist es
|=(1<<PA2); // EN ein PORTC &= ~(1<<PC5); // LED 5 an } } [/c] mfg.
Mikrocontroller und Digitale Elektronik
· Achim Seeger
· 12.10.2015 17:13
· 16 Antworten