hallo
habe jetzt die beiden Bits CKE und CPE auf 0 gesetzt und es funktioniert wieder nicht.
code schaut jetzt folgendermaßen aus: (nur die main)
Code:
void main() {
// configure SPI
// SMP CKE D/A P S R/W UA BF
// 0 0 0 0 0 0 0 0
#bit SSPSTAT_CKE = 0xb.6
// WCOL SSPOV SSPEN CKP SSPM3 SSPM2 SSPM1 SSPM0
// 0 0 1 0 0 0 0 0
// SSPM3-SSPM0: 0000 -> Master Mode; Tosc/4
// SSP Enable Bit: 1
#bit SSPCON1_CKP = 0xb.4
SSPCON1_CKP = 0;
SSPSTAT_CKE = 0;
//int i;
setup_spi(spi_master|SPI_H_TO_L|SPI_CLK_DIV_4);
output_low(PIN_D3); // Chip select
//Display reset
output_high(PIN_C4); // RES
delay_ms(5);
output_low(PIN_C4); // RES
delay_ms(10);
output_high(PIN_C4); // RES
output_low(PIN_D2); // D/C -> Command mode
spi_write(0x21); // function set: extended instruction set
spi_write(0xC8); // mittlerer Kontrast
spi_write(0x06); // Temp. Ausgleich
spi_write(0x13); // bias 1:48
spi_write(0x20); // function set: normal instruction set
spi_write(0x0C); // display control set normal mode
output_high(PIN_D2); // D/C -> DIsplay mode
spi_write(0xFF);
spi_write(0x00);
spi_write(0xFF);
spi_write(0x00);
spi_write(0xFF);
spi_write(0x00);
while(true) {
}
}
also ich habe jetzt nochmal die Spannungen an den Spannungsteilern gemessen und keine Spannungseinbrüche feststellen können.
Am SCK und SDO habe ich eine Spannung von 3,1V müsste stimmen oder??
Vdd 3,4V
RES 3,1V
D/C 3,1V
und am Vout (von dem pin geht der Elko auf Masse) habe ich 2,1V
mfg
Lesezeichen