Hero.sl
New Member
Hi folks,
I've been working in this project where I have to send a video stream from a PC to a display. I'm using Densitron 160x128 65/252k OLED (Driver:SEPS525) module for some reasons. The famous 18F4550 is handling the interfacing part.
Without further I do, I present my progress
Currently I'm just sending a list of full frames (160x128x16bit) via the USB using my PC app which I developed using C#. The device acts like a generic USB device.
The OLED is connected to the PIC mainly via the SPI port. It consumes few other GPIOs too. The PIC is running @ 48MHz with PLL.
I'm experience a slow frame rate when I'm filling up the RAM of the OLED.(Not related to the above video) It is stated that the SPI can go up to 12Mbit/s in the datasheet. Is this because something wrong with the SPI config or because I'm having little processing (only Loops..) in between the SPI calls?
Tell me if I missed anything in this long post. And please feel free to advice me on my design, I'm not an embedded expert. Thank you
I've been working in this project where I have to send a video stream from a PC to a display. I'm using Densitron 160x128 65/252k OLED (Driver:SEPS525) module for some reasons. The famous 18F4550 is handling the interfacing part.
Without further I do, I present my progress
Currently I'm just sending a list of full frames (160x128x16bit) via the USB using my PC app which I developed using C#. The device acts like a generic USB device.
The OLED is connected to the PIC mainly via the SPI port. It consumes few other GPIOs too. The PIC is running @ 48MHz with PLL.
I'm experience a slow frame rate when I'm filling up the RAM of the OLED.(Not related to the above video) It is stated that the SPI can go up to 12Mbit/s in the datasheet. Is this because something wrong with the SPI config or because I'm having little processing (only Loops..) in between the SPI calls?
Tell me if I missed anything in this long post. And please feel free to advice me on my design, I'm not an embedded expert. Thank you
Code:
// CCS C
// Main function
// OLED Initialization
setup_spi(SPI_MASTER|SPI_H_TO_L|SPI_CLK_DIV_4); // Div by 4 to get the max rate
while(1){
for(i=0;i<128;i++)
{
for(j=0;j<160;j++)
{
Write_Data(0xF8); // Sending : 11111000 00000000 = Red
Write_Data(0x00);
}
}
// Fill another color
}
void Write_Data(unsigned char Data)
{
output_low(CS);
output_high(DC);
spi_write(Data);
output_high(CS);
output_high(DC);
}
Last edited by a moderator: