Skip to content

Commit

Permalink
fix bug shift register
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bonani committed Jun 25, 2018
1 parent 8263729 commit ff123a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ void leds_init(void) {
SPI1CON1bits.DISSDO = 0;
SPI1CON1bits.MODE16 = 0;
SPI1CON1bits.SMP = 0;
SPI1CON1bits.CKE = 0;
SPI1CON1bits.CKE = 1; //change data on falling edge
SPI1CON1bits.SSEN = 0;
SPI1CON1bits.CKP = 0;
SPI1CON1bits.CKP = 0; //active state high
SPI1CON1bits.MSTEN = 1;
SPI1CON1bits.SPRE = 0b110; // Secondary 2:1. Spi clock 8Mhz
SPI1CON1bits.PPRE = 0x3; // Primary 1:1
Expand Down

0 comments on commit ff123a6

Please sign in to comment.