Mam mensi problem s 2x74HC595. Mam ich zapojene kasakdovito, ale ta druha mi zobrazuje to iste ako ta prva, nieco mi asi unika a neviem prist na to co… Prosim o radu, staci iba rada, v datasheete som toho moc teda nevycital…
[code]#define F_CPU 8000000
#define vystup 0b0001000001000000
#include <avr/io.h>
#include <util/delay.h>
void SPI_MasterInit(void)
{
DDRB = 0b00101100;
PORTB = 0b00000100;
SPCR = 0b01010001;
}
void SPI_MasterTransmit(char cData)
{
PORTB = 0b00000000;
SPDR = cData;
while(SPSR == 0b00000000);
PORTB = 0b00000100;
}
void main(void)
{
SPI_MasterInit();
SPI_MasterTransmit(vystup);
}
[/code]