Tuesday, January 25, 2011

DMA in LPC17xx

Direct Memory Access is a feature which allows the peripherals to access the memory directly or to transfer data to other peripherals without the help of CPU. So whenever we are using DMA, we can be doing computations on the CPU while the data transfer is taking place. Effectively the microcontroller is multitasking.

LPC17xx has a General Purpose DMA (GPDMA) which has 8 channels of which each can perform unidirectional data transfer. All types of data transfers like memory-memory, memory-peripheral, peripheral-peripheral are supported. And we can prioritize the DMA transfers as we wish. It can also perform 8-bit, 16-bit and 32-bit wide transactions. If we want to transfer a stream of data that is not stored in contiguous manner, then we can use the scatter and gather feature of the DMA which uses linked list. There are many many more features available with the GPDMA out of which I will be explaining some basic features in this post. I will talk about other advanced features as and when it is required.

Monday, January 24, 2011

Using PWM on LPC17xx

PWM can be used for generating analog signals of frequency very much lower than that of the PWM frequency. LPC1768 has one PWM with six channels. There will be one timer for each PWM and this timer will be used by all channels of that PWM. Configuring the PWM is similar to that of configuring a timer. The only difference is that we also need to specify the location of rising and falling edges for each channel that we use.

Monday, January 17, 2011

Why is NTSC color carrier frequency 3.57954545 MHz and not some other number that can be remembered easily?

Hello guys. I am back after a long break. Now I will continue to tell a little more about NTSC before I start writing blogs on the actual Game Console implementation on LPC1768. I would suggest you to read the previous post before reading this one for better understanding.

I mentioned that the NTSC color carrier frequency is 3.57954545 MHz. If I want to create a game console for NTSC TV then I need to generate this frequency and use it as the color carrier. But why is 3.57954545 MHz chosen as the carrier and not some other frequency which can be easily remembered or generated?