Overview
dsPIC30F2010 is a 16-bit Digital Signal Controller from Microchip Technology. This 28-pin PICMicro has a 10-bit ADC module with up to 1MSPS conversion rate. It able to operates up to 30MIPs.
![]() |
Soldered PCBA |
![]() |
dsPIC30F2010-20I/SP I have |
![]() |
dsPIC30F2010-30I/SO I have |
dsPIC30F1010 is 16-bit Digital Signal Controller enhanced for SMPS application. It has a 10-bit ADC module with the conversion speed up to 2000kSPS. It also able to operate up to 20MIPs.
![]() |
A dsPIC30F2010 DIP |
![]() |
A dsPIC30F1010 DIP |
These DIP micro-controllers can easily prototype on a breadboard. However we can create a simple prototype board for these chip from scratch. I designed a prototype board for these chips with a PICKit2 programmer to make it self and easier to prototype.
Circuit Design
I use Protues VSM to design the schematics for this board. Most of parts are already have in Protues while other parts are downloaded from snapeda website.
I putted some major modules on this board:
- PICKit2 programmer
- dsPIC30F2010 and dsPIC30F1010 IC socket
- RS-232 to TTL converter
- ADC inputs
- Switches inputs,
- LEDs outputs
- Male header for external connection
![]() |
Schematic Sheet #1 |
![]() |
Schematic Sheet #2 |
![]() |
Schematic Sheet #3 |
I use three A4 size sheet of this design.
PCB Design
Protues PCB design is very easy to use and light weight. It also have a 3D preview tool and Gerber file exporting and viewing tool.
![]() |
PCB Design in Protues |
This PCB is approximately 10cmx10cm in size. I use two layers of copper because it is convenience. Furthermore this size of PCB is very low cost to fabricate using any popular PCB manufacturer such as PCBWay .
![]() |
Top Copper |
![]() |
Bottom Copper |
![]() |
Top Silk |
It's difficult to fabricate this double-side PCB at home using a CNC machine or toner transfer method. This PCB can be fabricate at very low cost by many PCB manufacturers.
PCB Fabrication
I have been using PCBWay for many years now. PCBWay fabricate PCBs at low cost, fast processing time for only 24 hours, and fast delivery time using any carrier options. This double side 10cmx10cm can be fabricate at only 5USD for 5 to 10pcs by PCBWay. It's a standard PCB with silk screen and solder mask.
![]() |
10 PCBs for only 5USD |
For different size of PCB we can instantly quote on PCBWay website using a zip PCB Gerber file without account.
![]() |
PCBWay Instant Quote |
We can accurately see the preview of fabricated PCB generated by the company's online Gerber file viewer.
![]() |
Top Side |
![]() |
Bottom Side |
PCBWay also offer PCBA assembly service at reasonable price.
![]() |
PCBWay PCB Assembly Service |
Click here to download this PCB design
![]() |
PIC18F4550 and DSPIC30F2010 PCB fabrication from PCBWay.com |
![]() | ||
A box of two PCB for PIC18F4550 and dsPIC30F2010 Prototype Board sponsored by PCBWay |
A PCB package of 5-pcs |
![]() |
A PCB package of 5-pcs |
The PCB processing time is only one day with a few days of delivery time. DHL logistic is preferred by PCBWay and customers.
It's a standard and high quality PCB. Finished PCB needs a surface treatment process to treat them from corrosion. So even we don't solder them instantly its quality is not defected by outside environment.
For this 5USD PCB order, we can choose different colors of solder mask and silk screen legend as preferred. The standard thickness is 1.6mm that is robust enough for most of application. We can order up to 10 units for only 5USD.
PCB Assembling
PCBWay offers PCB assembling service for a wide range of order with a minimum order of 25 units at a reasonable price.
![]() |
Soldering PCB Kit |
![]() |
PCBA Top Side |
I tested this PCBA with my PC program to to the PICKit2 device programmer. Everything works well.
![]() |
Power Supply Testing |
I test it with PICKit2 on host software. It's error free.
![]() |
PICKit2 Software Test |
![]() |
PICKit2 Software |
I putted a two-row machine-tool female pin header to optionally place a dsPIC30F1010-30I/SO I soldered on an SMD IC adapter board.
![]() |
A dsPIC30F2010-20I/SP and a dsPIC30F1010-30I/SP that could fit on this PCBA |
I needed to remove dsPIC30F2010 from this PCBA first before placing the dsPIC30F1010 chip.
![]() |
Testing the dsPIC30F1010 on this PCBA |
This chip could programmed with the earlier version of PICKIT programmer, PICKIT2.
![]() |
Testing the dsPIC30F1010-30I/SP with PICKIT2 |
Click here to download this PCB design.
CCS PICC Sample Code
CCS PICC is very easy to use but we need to pay for license. For beginners with with this embedded C compiler using its project wizard is a good choice.
Using Project 24 Bit Wizard
We can use this wizard for dsPIC30F2010 since it's a 24-bit instruction device.
![]() |
LED Blinking Using Wizard - Device Settings |
![]() |
LED Blinking Using Wizard - Blinking Example |
It will generate source code for us.
- #include <main.h>
- void main()
- {
- //Example blinking LED program
- while(true)
- {
- output_low(LED);
- delay_ms(DELAY);
- output_high(LED);
- delay_ms(DELAY);
- }
- }
Its main.h file is separated from main.c file.
- #include <30F2010.h>
- #device ICSP=1
- #use delay(clock=20000000)
- #FUSES NOWDT //No Watch Dog Timer
- #FUSES CKSFSM
- //Clock Switching is enabled, fail Safe clock monitor is enabled
- #define LED PIN_D0
- #define DELAY 1000
In the #use delay directive I have the parameter crystal=20000000 to clock=20000000 to prevent error.
On Board LED Blinking
On this PCBA there are two LEDs connects to RD0 and RD1 respectively. So I wrote a simple PIC24 C program to toggle these two LEDs.
- #include "board.h"
- void main()
- {
- //Example blinking LED program
- while(true)
- {
- output_low(LED0);
- output_high(LED1);
- delay_ms(DELAY);
- output_high(LED0);
- output_low(LED1);
- delay_ms(DELAY);
- }
- }
I also separate its board.h header file as lists below.
- #include <30F2010.h>
- #device ICSP=1
- #fuses HS,NODEBUG,NOWDT,PR,CKSFSM
- #use delay(crystal=20000000)
- #define LED0 PIN_D0
- #define LED1 PIN_D1
- #define DELAY 500
I use its on-board 20MHz crystal oscillator instead of a 10MHz oscillator because I can not use its PLL to get its maximum 20MHz frequency. So this crystal oscillator will directly drive the processor.
Tactile Switches and LEDs
There are two push button connect to RC13 and RC14 of dsPIC30F2010 PCBA respectively. I use software polling from these two switches to toggle two on-board LEDs of RD0 and RD1 respectively.
- #include "board.h"
- void main()
- {
- set_pullup(TRUE,PIN_C13);
- set_pullup(TRUE,PIN_C14);
- while(TRUE)
- {
- //TODO: User Code
- if(input(SW0)==0){
- output_toggle(LED0);
- delay_ms(500);
- }
- if(input(SW1)==0){
- output_toggle(LED1);
- delay_ms(500);
- }
- }
- }
I also modify its main.h file adding two buttons definition.
- #include <30F2010.h>
- #device ICSP=1
- #fuses HS,NODEBUG,NOWDT,PR,CKSFSM
- #use delay(crystal=20000000)
- #define LED0 PIN_D0
- #define LED1 PIN_D1
- #define SW0 PIN_C13
- #define SW1 PIN_C14
- #define DELAY 500
I don't use ICD feature due to complexity, and I don't this hardware.
RS-232 To TTL UART Converter
I putted a DB9 COM Port connector on this board for device and host PC communication. However I don't use its standard MAX232 level converter. Instead I use transistor level converter.
This is a sample program for on-board UART.
- #include "board.h"
- #use rs232(UART1, baud=9600, stream=UART_PORT1)
- void main()
- {
- long cnt=0;
- printf("HELLO WORLD!\n\r");
- printf("Saturady 13 September 2025\n\r");
- printf("dsPIC30F2010 DIY Prototype Board.\n\r");
- printf("UART To RS-232 Demo Program\n\r");
- while(TRUE)
- {
- //TODO: User Code
- printf("Time In Seconds: %Lu \n\r",cnt);
- output_toggle(LED0);
- cnt++;
- delay_ms(1000);
- }
- }
The board.h file is the same as above.
- #include <30F2010.h>
- #device ICSP=1
- #fuses HS,NODEBUG,NOWDT,PR,CKSFSM
- #use delay(crystal=20000000)
- #define LED0 PIN_D0
- #define LED1 PIN_D1
- #define SW0 PIN_C13
- #define SW1 PIN_C14
- #define DELAY 500
It will print the following text. LED connects to RD0 toggle every time the UART send data.
CCS PICC Serial Input Output Monitor
Analog to Digital Converter
There are one potentiometer and LM35 temperature sensor on this PCBA. The following C example use the 10-bit ADC module of dsPIC30F2010 to read the ADC value from these two on-board devices.
Great DIY project! It's impressive how you've detailed the setup with dsPIC30F2010 and dsPIC30F1010. Projects like this really highlight the importance of well-structured PCB layouts. For those looking to take their custom electronics further, professional PCB designing services can really streamline the process and enhance performance. Thanks for sharing this resourceful post!
ReplyDelete