Programming – first tips

Posted by openPicus | On: Jun 29 2010

We are waiting for the PCB manufacturer for the new prototypes and we plan to start first hundreds pcs production during July. In the meantime we are working on the software side to give the first “hello world” with WI-Fi code to let people start the developments of their applications.

In the beginning will be not available our IDE (we are working on a cross platform porting based on NetBeans) so software must be developed using the standard IDE from Microchip (only for Windows at the moment..sigh!).

We’ll provide a step by step installation guide to let you start development in a few moments.

Yesterday we had a meeting and we think we’ll use some “tricks” to make programming easier and reacheable even from those people that are not familiar with Microcontrollers C++.

On the Header file (hwpicus.h) will define the standard pinout of the module. Anyway advanced user may decide to modify it and have 1 UART more or change Digital Inputs to other kind of peripherals.

Basically we want to make the code very easy to understand and to use and here are some examples:

Turn on Digital Output OUT5-> set(out5)=1

Turn off Digital Output OUT5-> set(out5)=1

PWM signal Frequency 10kHz, duty 50% on PWM OUT2-> set(out2,50,10)

PWM signal Frequency 100hz, duty 20% on PWM OUT2-> set(out2,20,0.1)

Read the current status of Digital input IN1-> get(in1)

Note: the ADC is 10bits (1024), since the Vref is 2.048V each bit is 2mV

Read the current status of Analog input AIN1-> get(ai1)

Interrupts are possible to be enabled and disabled.
It’s possible to specify the condition of the interrupt.
When the interrupt comes (for example on digital input in1) the called function must be named int_in1

Enable Interrupt on Digital Input IN1 on fall (from 1->0) -> interrupt(in1,on,fall)
Enable Interrupt on Digital Input IN2 on raise (from 0->1) -> interrupt(in2,on,raise)
Disable Interrupt on Digital Input IN3

Enable Interrupt on Analog Input AI1 under a specified level (500 means 500*2mV=1V) -> interrupt(ai1,on,500,fall)

Please send us your comments also by email, we highly appreciate your contribution to make life easier for everybody!


  1. Anonymous says:

    Anybody interested into developing a standalone istant messaging system? With a touchscreen and a graphic lcd display it would be possible. There’s nothing similar on the market and I think it vould be nice having a small ‘box’ wirelessy connected to the gateway/router, able to send and receive text messages to other ‘boxes’. If somebody is interested into the project please let me know. Since I haven’t any wifi module :( I’ll be making a wired prototype for testing purposes…

  2. picus says:

    this is a good idea! we’ll release the modules before end of july. Contact me for details

  3. Alejandro says:

    The idea sounds really good, but myabe it would be better (and it’s just an idea) to build this concept as an “appi” for a smartphone because to have another “electronic box” in the pocket could be a little bulky. What do you think? Greatings.

  4. Anonymous says:

    Well, having the box sitting in the kitchen would be nice, providing a recharging base it can also be portable. :)

    If someone is able to write a program for wifi enabled smartphones it would be even better, defining an open protocol for the messages smartphones and this box can comunicate eachother too. :)

Leave a comment