UNI-DS6 development board for experimenting with dsPIC30F6014A

UNI-DS6 is an universal development board from mikroElektronika for experimenting with a wide range of microcontrollers including PIC, AVR, dsPIC, ARM, and 8051. I am going to use this board to educate myself about Microchip’s dsPIC Digital Signal Controllers (DSCs). The dsPIC DSCs are 16-bit high performance microcontrollers and more powerful than regular PIC devices. They are special because they combine the best features of microcontrollers with the computational capabilities of a Digital Signal Processor (DSP), and they are capable of doing complex mathematical operations involving Fourier transforms. I am going to describe briefly about the features of UNI-DS6 board first, and then will write the “Hello World” application to test the board with dsPIC30F6014A DSC.

UNI-DS6 Development Board from mikroElektronika

What is UNI-DS6?

UNI-DS6 is mikroElektronika’s latest version of universal development board that currently supports eight different microcontrollers, namely PIC16F887, PIC18F8520, dsPIC30F6014A, Atmega128, CY8C27643, LPC2148, LPC2214, and AT89S8253. A separate mikroBoard for each of these microcontrollers are available, which can be inserted into the 2×80 pin socket available on the main development board so that you can perform experiments with your choice of microcontroller, while the rest of the board remains the same. Each mikroBoard consists of an on-board programmer, so no need for an external programmer. The development board is fully featured with a regulated power supply (selectable +5.0/3.3 V), external 12-bit ADC channels using MCP3204, on-board FTDI chip for USB-UART support, USB connector, serial EEPROM, standard character LCD socket, GLCD with touch panel support, MMC/SD card slot, 72 LEDs, 72 tact switches and lot more. If you are interested to know more about UNI-DS6 features, you can read the user’s manual. The picture below shows the UNI-DS6 board with dsPIC30F6014A mikroBoard and few other accessories plugged in.

UNI-DS6 with dsPIC30F6014A mikroboard plugged-in

About dsPIC30F mikroBoard

This mikroBoard contains dsPIC30F6014A DSC with an on-board USB programmer. The dsPIC30F6014A is a 16-bit DSC with 144 Kbytes of Flash program memory. In order to program the DSC with the on-board programmer you need to install mikroProg Suite for PIC application on your PC. You can download this application with necessary drivers from here. Please refer mikroElektronika’s installation manual for installing the USB drivers. The mikroBoard can also be used as a standalone device (without the UNI-DS6 board). A jumper (J1) is provided on the mikroBoard to select this option. As a standalone device, the board can be powered directly from the USB cable. A close-up picture of dsPIC30F6014A mikroBoard shown below reveals some of its features.

dsPIC30F6014A mikroboard for UNI-DS6

We will be exploring the features of dsPIC30F6014A more in upcoming tutorials. For now, we will write a simple test program for dsPIC30F6014A to make sure that everything is setup properly. The following “Hello World” program is written and compiled for dsPIC30F6014A with mikroC Pro for dsPIC30/33. The DSC is configured to run at 80 MHz using internal PLL (8x) along with the external 10.0 MHz crystal. The configuration bit setting in mikroC Pro for dsPIC30/33 can be done through Project-> Edit Project window (similar to that of mikroC Pro for PIC). The program sequentially turns the LEDs connected to PORTA, PORTB, PORTC, PORTD, PORTF and PORTG of dsPIC30F6014A on and off.

/*

 "Hello world" program for dsPIC30F6014A (UNI-DS6 board)
  Test configuration:
  MCU:             dsPIC30F6014A
  Dev.Board:       UNI-DS6
  Oscillator:      XT-PLL8, 10.000MHz x 8 = 80 MHz
*/
void main() {
 ADPCFG = 0xFFFF;       // Configure AN pins as digital I/O
 TRISA = 0;             // Initialize PORTA as output
 TRISB = 0;             // Initialize PORTB as output
 TRISC = 0;             // Initialize PORTC as output
 TRISD = 0;             // Initialize PORTD as output
 TRISF = 0;             // Initialize PORTF as output
 TRISG = 0;             // Initialize PORTG as output
 LATA = 0;              // Set PORTA to zero
 LATB = 0;              // Set PORTB to zero
 LATC = 0;              // Set PORTC to zero
 LATD = 0;              // Set PORTD to zero
 LATF = 0;              // Set PORTF to zero
 LATG = 0;              // Set PORTG to zero
 while(1) {
  LATA = ~LATA;
  Delay_ms(300);
  LATA = ~LATA;
  LATB = ~LATB;
  Delay_ms(300);
  LATB = ~LATB;
  LATC = ~LATC;
  Delay_ms(300);
  LATC = ~LATC;
  LATD = ~LATD;
  Delay_ms(300);
  LATD = ~LATD;
  LATF = ~LATF;
  Delay_ms(300);
  LATF = ~LATF;
  LATG = ~LATG;
  Delay_ms(300);
  LATG = ~LATG;
 }
}

Programming the dsPIC

The mikroBoard for dsPIC30F6014A does have an on-board programmer and you need to install mikroProg Suite for PIC application software on your PC to operate it. Remember that the mikroProg Suite for PIC communicates with the on-board programmer through the mini USB port on the mikroBoard itself and not through any USB port on the UNI-DS6 board. I would suggest to follow the following steps to setup the on-board programmer for dsPIC.

  1. First, download mikroC Pro for dsPIC30/33 compiler from HERE and install it on your PC.
  2. When the installation is complete, it will ask if you want to install mikroProg Suite for PIC. Say yes, and install that too.
  3. Next, it will ask if you want to install the drivers for mikroProg programmer. Say yes, and select the appropriate driver suitable to your operating system, and install it. That’s it.

Once the above three steps are successfully done, your PC is all setup to write your applications, compile them and transfer the HEX files to the dsPIC30F6014A. Writing and compiling programs in mikroC Pro for dsPIC30/33 is similar to that in mikroC Pro for PIC. If you are not familiar with this, read ‘Lab 1: Flashing an LED‘. After you successfully compiled the program, connect the mikroBoard to PC through a USB cable, and select Tools -> mE Programmer from the mikroC Pro for dsPIC30/33 application window. This will automatically open the mikroProg Suite for PIC application to transfer the HEX file to the dsPIC30F6014A.

Clicking on mE Programmer link will automatically start mikroProg Suite

Once the test program is loaded, you need to turn on the LED switches for different ports. It can be done through switch SW12 on UNI-DS6 board. Slide switches 1 through 6 of SW12 to ON position (shown below).

Switches for connecting LEDs to dsPIC ports

The dsPIC30F6014A will run the test program and you will see the LEDs connected to different ports are sequentially turning ON and OFF. Keep in mind that dsPIC30F6014A has six 16-bit ports (PORT A, B, C, D, F and G), and 68 I/O pins in total. This means not all the ports are complete 16-bit accessible. For example, in dsPIC30F6014A device, PORTF (which in fact is 16-bit) has only 9 pins accessible (RF0 through RF8). So for incomplete ports, you won’t see all the LEDs glowing.

LEDs connected to PORTs A, B, C, D, F and G turn on sequentially

Limitations of UNI-DS6 development board

Although this board is described as an universal development board, it does have some limitations. Along the right side of the development board, there are eleven 10-pin male header connectors that are linked to the microcontroller I/O ports. They are named as PORTA (8-bit), PORTB (8-bit), PORTC (8-bit), PORTD (8-bit), PORTE (8-bit), PORTF1 (8-bit, RF0-RF7), PORTF2 (RF8-RF15), PORTG1 (8-bit, RG0-RG7), PORTG2 (RG8-RG15), PORTH (8-bit), and PORTJ (8-bit). Each connector consists of 8 port pins, a Vcc line, and a Gnd pin. Depending upon the type of mikroBoard plugged into the UNI-DS6 board, the corresponding I/O ports can be accessed through these connectors. This arrangement works well for the mikroBoards with 8-bit microcontrollers as it provides access to all of the I/O pins. But in case of dsPIC30F6014A that has 16-bit I/O ports, it does not provide access to all of the port pins. For example, the RB8 through RB15 pins of PORTB seem to be inaccessible on the UNI-DS6 board. Similarly, half of the PORTD pins are missing. Besides, none of the LEDs and tact switches on-board are connectible to these pins. So, if you want to develop things strongly with dsPIC, I would suggest to buy the dsPIC specific deveopment board such as dsPICPRO4. That will give you the full flexibility in accessing all the I/O ports of the dsPIC microcontroller. But if your first preference is 8-bit microcontrollers, and you want 16-bit dsPIC as an additional feature, this development board is a wonderful choice. So this is a trade-off. I won’t complain about the UNI-DS6 board because, for me, the primary reason for getting this board was to develop applications for PIC16F887 and Atmega128 microcontrollers, which it serves very well. The dsPIC DSC was my second preference, and I am pretty satisfied to have the support for it on the same board, not wholly but substantially.

Related Posts

2 comments

  • i m planning to do “Heart rate measurement from fingertip ” from your site ..

    where are you from?

  • Hi

    I m tushar doing Last year INSTRUMENATION engineering in mumbai INDIA.
    your website is too good. i like it . i m planning to do a project from your website.. But i need some help from you ..

Leave a Reply

Your email address will not be published. Required fields are marked *