YogaDog Posted May 2, 2018 Share Posted May 2, 2018 Hi, can someone help me with Verilog spi module for Altera ? Link to comment Share on other sites More sharing options...
D@n Posted May 2, 2018 Share Posted May 2, 2018 @YogaDog, Maybe. Depends on your question. Dan Link to comment Share on other sites More sharing options...
YogaDog Posted May 2, 2018 Author Share Posted May 2, 2018 The task is to change the brightness level depending on the input value. Link to comment Share on other sites More sharing options...
D@n Posted May 2, 2018 Share Posted May 2, 2018 What's the difficulty? Dan Link to comment Share on other sites More sharing options...
YogaDog Posted May 2, 2018 Author Share Posted May 2, 2018 I do not really understand how to write the code correctly Link to comment Share on other sites More sharing options...
D@n Posted May 2, 2018 Share Posted May 2, 2018 Have you seen the Verilog code I wrote for driving the OLEDrgb? You can find a C program to control that code here as well. This code uses a fixed brightness setting, but you should be able to play around with it if you would like from that point. Are you at the point yet where your OLEDrgb driver works? Dan Link to comment Share on other sites More sharing options...
YogaDog Posted May 2, 2018 Author Share Posted May 2, 2018 Can I connect this Verilog file to the altera de and test the sensor? Link to comment Share on other sites More sharing options...
D@n Posted May 2, 2018 Share Posted May 2, 2018 @YogaDog, You'll have some work to do in order to do it. The Verilog file needs to be driven by a Wishbone bus master. That's why the CPU software is so important. If you wanted to, and you had a spare UART, you could use this design to create a wishbone master that would be controlled from the serial port ... but even then, you'd still have to 1) connect it to the wishbone interconnect, and 2) send the values to start it up from your host computer. You might find this simulation model more valuable. When using Verilator on a gtkmm enabled machine, you can then use it to "see" what should be on the OLEDrgb in an on-screen window. Dan Link to comment Share on other sites More sharing options...
YogaDog Posted May 2, 2018 Author Share Posted May 2, 2018 I have a Pmod ALS light sensor, the data is taken from it. Depending on the sensor data, the brightness of the Oled RGB screen changes all this is connected to Altera DE, the code on the Pmod ALS is ready. I do not really understand how Oled RGB connect. Link to comment Share on other sites More sharing options...
D@n Posted May 2, 2018 Share Posted May 2, 2018 @YogaDog, At the physical level, it's a basic SPI connector. That's what the Verilog file I shared handles. At the next level up, there's a very complicated protocol associated with the OLEDrgb. To get it started, there's a careful bit of timing that has to be done properly via the reset wire and power wires, together sequence of commends you need to send to it. This was the purpose of the software. You could replace this with a state machine if you wanted, but I don't have an example of that to show you. Dan Link to comment Share on other sites More sharing options...
YogaDog Posted May 2, 2018 Author Share Posted May 2, 2018 Thank you very much Link to comment Share on other sites More sharing options...
Question
YogaDog
Hi, can someone help me with Verilog spi module for Altera ?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.