Sunday, January 19, 2020

Open Source USB Display: SPI MIPI Bridge with FPGA Test: PIC32MZ USB HS SPI Bridge QT5

This post is going to be second part in the SPI MIPI Bridge. In this post i will be giving details about USB HS to SPI Bridge  To feed into FPGA for displaying on to MIPI LCD. Previous project SPI MIPI Bridge can be found here.


USB Hardware Stacked onto FPGA BOard

Saturday, January 18, 2020

Open Source SPI MIPI Bridge with FPGA: Driving IPOD Nano 6 MIPI LCD Using FPGA, MIPI LCD Reverse Engineering

As display technology is advancing, High Resolution LCD/TFT LCD panel are becoming more common. With higher resolution comes nicer picture quality, rich content with higher bandwidth requirement to transfer that content from the display controller to the display it self. Gone those days of 8-bit parallel bus , now MIPI is becoming more and more common with nice display.  Yes one can still buy parallel or lvds interface display. But as one try to move towards nicer quality display MIPI is becoming dominant. Basic MIPI DPHY can achieve 1Gps per-lane with mipi DPHY V2.5 you can go upto 6Gbps Max total bandwidth.



This post going to be about how to use FPGA to drive a MIPI LCD. Specifically LH154Q01-TD01 LCD This is a 240x240 1.54 inch TFT LCD this LCD is used in Apple IPOD nano 6G. I first get to know about this LCD from mike's post on his website mikeselectricstuff and youtube channel. It is highly recommended to got through it if you are going to implement this project.

Monday, December 2, 2019

DIY USB 3.0 Camera: UVC Video Device Class VGA Camera Using Cypress FX3

This Project is going to next in the series of previous projects. Previously i interfaced inexpensive OV7670 VGA Camera to MCU.

In this post we will overcome the 10FPS limit of frame rate caused by slow Parallel port of PIC32MZ. This version of Camera will use 4.8Gbps Cypress FX3 USB 3.0  controller, with use of this controller comes 32bit 100Mhz GPIF interface, which make it possible to easily implement 30 FPS 640x480 live video transfer. 

Capability of Cypress FX3 is way higher than VGA 30FPS, but for this test project i will be limited the by the max resolution of OV7670. 



Marconi 2024 RF Signal Generator LCD Display Repair

This is going to addition to my previous Marconi 2024 Error 508 repair . I have recent bought my self a broken Marconi 2024 which has many issues, few issues i fixed in previous repair post now in this post i will show you how i replaced the LCD.

As many other people have pointed out controller of the LCD fitted in Marconi is compatable to RA6963,T6963 Controller so i search around on web and found ERM24064DNS-1 .

The LCD display we are replacing had VFD back-light but replacement LCD has LED back-light. so i need to take out VFD power supply and bypass with for 5V LED power supply.


Here is how VFD power supply is removed and bypassed, 5V is supplied by the board Display also needs 5V.

Replacement LCD Display size is exactly same but PCB size is small so mounting screw are different location. and Display thickness is also less with new Display.


Monday, September 23, 2019

Marconi 2024 RF Signal Generator Error 508: Amplitude modulator unlevelled Repair

I have recently bought a used Marconi 2024. But instrument was partially faulty having issue a minor issue with LCD screen and a comparatively major issue with Error 508 : Amplitude modulator unleveled. So it needed a repair First i will try to fix issue Error 508 because replacement compatible LCD will arrive later.

This post is going through will be mostly what to look for when you are attempting to fix same issue in your marconi/IRF or now aeroflex 2024 or similar marconi 2023.

This article will quote  service manual for this instrument multiple time, service manual can be easily found with just simple internet search or on ko4bb

As i have already fixed my issue now i know with my instrument issue was with carrier RF signal level being too low. But issue with other instrument many be different so  i will still describe here how i traced to the faulty component.

I assume all power supply voltage are fine with voltage and ripple.

There are two version of service manual available. old service manual have There are a quite a few error in newer service manual's schematic.

As per Maintenance manual  Error 508: Amplitude modulator unlevelled appear when pin diode based modulator loop is running into issue with either AM level or the level of carrier RF signal or detection circuit of AM modulated RF signal.






Tuesday, June 18, 2019

OpenSource DIY USB Webcam: OV7670 OV2640 Interfacing With PIC32MZ Streaming Video over USB Video Device class UVC Device

This project is going to extension to my previous project in which i implemented USB Video device class onto Microchip PIC32 USB stack.  Last project i showed how once can transmit static image over USB UVC , now i will be showing you how you can interface these commonly available  VGA/UXGA Sensors OV7670/OV2640 to PIC32MZ MCU.





Thursday, May 30, 2019

Implementing USB Video Device Class (UVC) Device Driver on Microchip USB Stack, PIC32

I was recently working on a little project in which i need to stream video from mcu to PC, so i decided to look for a solution. My first obvious solution was to make a custom protocol over USB bulk or isochronous Transfer and also make some application in Qt or MATLAB to stream and display video.

But when i looked little bit more , I found out that there is already a USB video class assigned for this specific task. Driver for UVC device are already standard and present in many well used OS. Driver is present in Windows and Linux both.

As Video over USB is quite resource intensive task so it is not common to use a MCU,  I was using PIC32 MCU for project, and USB stack Provided by microchip was no exception, Microchip USB stack does not have support for UVC. So i decided to implement my self.

This project will be multi part project ,
in First part i will have static image 160x120 pixel resolution, stream over the USB and play in VLC.
Second Part i will interface a OV7670 camera to the MCU and stream live video on VLC.





A Sample image 160x120 Pixel converted to yuy2 , Streamed over USB played on VLC


Monday, April 22, 2019

Zwei2: OpenSource Breadboardable Microchip PIC32MZ Board USB

Quite often i use PIC32 microcontrollers in my project, and as since quite some time PIC32MZ microcontrollers are there, with improved features such as USB HS and much more . i was not able to find a board which exactly fits my needs. so i made my self this little board ,i call it Zwei^2 , it is quite small,and can be put onto a breadboard.







Sunday, April 7, 2019

PIC32MX DMA Performance Test , PMP Parallel Master Port DMA Performance (Specifically PIC32MX470F512H)

This is going to be Quick Post showing Maximum Possible Performance of DMA in PIC32MX MCU, These tests are performed with PIC32MX470F512H running at 120Mhz

Short answer:
if you do not want to read further than. My result show DMA can perform 32bit transfers at rate of maximum 10Mhz. This result is quite similar to few other article on web, I do not have answer what exactly limit the maximum transfer rate to 10Mhz, but actual achievable transfer rate may vary depending on the System Bus availability,  As System bus is shared between all DMA , CPU and other peripheral.

I have also tried to trigger transfer from timer and external interrupt , any trigger rate above 10Mhz start skipping transfers,

As rule of thumb on PIC32 Maximum achievable trigger rate of DMA is System clock divided by 10, as i have read quite a few places each DMA transfer takes roughly  10 System Clock Cycles.

Experiment 1:

In this test I have setup PMP in slave mode, and we will using DMA to push data out of MCU over 8Bit Parallel Master port(PMP). PMP is also set to  Interrupt on each transfer  which will trigger DMA to copy one byte from a lookup table into PMDOUT register.
lookup table looks like this

uint8_t look_up[]=
{
    1,
    1<<1,
    1<<2,
    1<<3,
    1<<4,
    1<<5,
    1<<6,
    1<<7,
};

This look up table will display like this on oscilloscope output :
RD is active low , which is set to active. and D0 to D7 shows lookup table on PMP 8bit Data output port.

DMA byte transfer rate ~100ns each transfer, DMA free triggered by PMP Transfer
Each Byte transfer trigger next DMA transfer of next byte, DMA also start automatically when when all bytes from table transferred, This test show Each byte take same amount of time of ~100ns.

Monday, November 12, 2018

DIY Open Source LM399 10V Voltage Reference, Second Revision

This is second version of my simple LM399 based reference board, when i made my last version i received quite few small feedback form eevblog forum member, so i have made few improvements in second reversion accumulating those suggestions.

Fist improvements is , Reverse probity protection, Now you can see in left corner a P-channel Mosfet and a resistor forming reverse polarity protection. Now it can save its self from damage caused by reverse polarity.
With reverse polarity protection comes this little red power led indicating supply to the board.
one major change is , now there is this 1k 10 Turn pot with 10PPM Opamp gain setting registers  with help of this pot now it is possible to adjust output voltage from reference to exactly 10.00000V. And it can be easily jumpered if not needed
There are few minor change in the PCB as well slots cut around actual reference chip is now wider, so now it is little bit easier to fit insulation foam cap, there are few minor changes on silk screen indicates input voltage, input and output voltage polarity.