Getting started

From Curuxa

Contents


This is a summary explaining how to get started building and using Curuxa Main Boards and Modules, how they work, and how to program and test them.

You should be able to build the first circuits in a few hours, paying no more than 5-10 euros/dollars. After you know all of this you can build many more Modules and use them to build complex and/or interesting Applications.

Step 1 - Understand Curuxa

The Curuxa Project provides a set of electronic circuits (Main Boards and Modules) you can choose to build, and sample Applications to learn how they work so you could be able to design and build your own.

The whole idea is you can build as many Modules as you want or need, connect them to one of the Main Boards, and program the microcontroller on the Main Board as you want it to work.

More information about what is Curuxa and how it is organized.

You also need to know the internal standards used by the entire project.

Step 2 - Understand microcontrollers

A microcontroller is an integrated circuit (chip) including a processor, RAM, program memory, and usually integrated peripherals such as timers, communications interfaces/protocols, non-volatile-memory, analog-to-digital converters, signal generators...

You can write programs in many programming languages, typically C, BASIC or assembly language. Then you compile your source code using a compiler which generates a binary file (.hex file). For example if you build the MBP18 Main Board and you want to write code in C, you may want to use SDCC, which can parse source code written in C and generate binary files for PICs.

After you get the binary file, you have to copy/program/burn it into the microcontroller. The Main Board is plugged to a Microcontroller Programmer, which is connected to your computer. Then, you can use a development environment to burn the binary file to the microcontroller.


Step 3 - Build a Main Board

MBP40, one of the Main Boards

Go to the list of Main Boards and choose the one you would like to build. Some of them have more functionalities than others, but they are designed to be compatible to each other so you can plug almost any Module to most Main boards.

A good Main Board to begin with is MBP14. It's very simple to build and has many inputs and outputs, so you can plug a bunch of different Modules at the same time. It also has many integrated peripherals so it supports most Modules.

You only need a soldering iron, some soldering wire, and the components to build the Main Board you've just chosen.

Step 4 - Developing for microcontrollers (Main Boards)

Curuxa IDE

Once you have built you own Main Board and you have a Hardware Programmer you are ready to begin writing software for microcontrollers.

It consists in 3 steps:

  1. Write source code
  2. Compile it
  3. Burn it into de microcontroller

All of this can be achieved fast and easily by using Curuxa IDE.

Curuxa IDE is a multiplatform development environment which allows you to write you own source code or choose sample code, compile it using SDCC and write the generated binary file into the microcontroller/Main Board using the PICkit2 programmer.

You can download Curuxa IDE here.

See also the alternatives.

Step 6 - Start building Modules

Now you are able to write programs for microcontrollers and program any Main Board. You can start building some simple Modules, such as SISW-SPST (buttons) and LTIND-A (LEDs), plug them to your Main Board and test them. Remember that you can plug multiple Modules to the same Main Board.

The more Modules you build, the more complex and interesting devices you can make.

Some of the available Modules:

MC2A LTIL-A SIDST-GP2 CMIR-RC LTIND-A CMIR-RC SIBW-1Y SISW-SPST MC2B AO-SPK

You should also visit the full list of available Modules.

You can find devices built by the community of users with multiple Main Boards and Modules at the Curuxa Community Site. There you can also find custom unofficial Modules.


Alternatives

The write_code -> compile -> program -> run process highly depends on the operating system, programs, development environments, programming languages, microcontroller architecture and compilers you want to use. You can use whatever you want, and there are thousands of combinations. Curuxa IDE is a very simple option but you may want to try different ways of doing this and choose the one you like the most.

Here is a list of tutorials about how to write programs for PIC microcontrollers:

After you get the binary file containing the program which will be executed on your microcontroller, you have to burn it into the device.

Again, there are thousands of combinations depending on the operating system, development environment, programming software, microcontroller architecture and programming hardware you are using.

Once you have bought or built your Microcontroller Programmer you have to choose the programming software that communicates with the programmer:

Recommendations

Assembling

  • When cutting boards (PCBs or perforated boards) try not to breath the small particles. They are carcinogen
  • Put as many components on the board as possible, twist their legs a bit and then solder all of them, instead of putting and soldering components one by one. It's much faster

Soldering

  • Buy a good soldering iron of around 30W. There is a huge difference between good and bad ones. A good soldering iron cost no more than 30€ and you'll use it for lots of years
  • Be careful when soldering. The soldering wire produces toxic fumes
  • When creating tracks on perforated boards using soldering wire, if you cannot join two consecutive pads because the tin sticks itself to the independent pads, that's because the board, tin and/or pads are very hot. Let the board cool for a moment and try not to give too much hot with the soldering gun

Programming PICs

  • If a pin doesn't work as expected, check all registers that select the mode in which that pin works. Most pins can work in multiple modes (digital I/O, analog input, comparator input or output, UART data/clock pins...), and they could be set to a mode you don't want.