Some sort of blog, I think. I wonder if this blog cost me web space - I mean, if it diminishes the total free space of my site... must check.

Major changes

posted Apr 15, 2014, 7:03 PM by Vasile Guta Ciucur   [ updated Apr 15, 2014, 7:19 PM ]

PIC microcontrollers
All old and unsupported designs are no longer available. For USB boards, I will focus on using HID Bootloader and for them, I will continue to use JALv2 language, as it has a good USB support. I will extend this also on PMP v.2 language when it will be available and maybe, it will replace the JALv2 language entirely for the majority of 8bit microcontrollers.

Meanwhile, I have a PIC18F46K22 board in development. For this, I will start using Firewing language, as it has support also for PIC24 and PIC32 microcontrollers. It comes with a good library support.

AVR microcontrollers
As for AVRs, there are a host of very good boards at rather good prices.But, because this site is about DIY, I will have also my own version of Arduino PRO board with through hole components. Just to say that I also did one - in fact, I'm using it already.

Regarding the software, I started with Arduino/Wiring language and continued with avr-gcc C compiler. But thanks to Dietmar, a member of TheBackShed forums, I discovered a fantastic language which come with a great library. Since then, LunaAVR became my main language. I will occasionally use Arduino language.

It can be a better CMS than wordpress

posted Jul 12, 2013, 5:34 PM by Vasile Guta Ciucur   [ updated Jul 12, 2013, 5:34 PM ]

I'm pretty sure that this section is consuming my limited (100Mb) hosting space. If this section can be somehow improved at the wordpress level, Google Sites can be much better than

Until then, I will use a separate blog for the News section, hosted here.

Fighting for space on a 12F675 device - Pascal like languages

posted Apr 15, 2011, 7:51 PM by Vasile Guta Ciucur   [ updated Jul 25, 2013, 7:03 AM ]

1. About the device

The PIC12F675 is a little 8pin microcontroller device which has some interesting features. Is cheap, ideal for beginners and can be freely supported by many commercial languages on the market.

 Parameter name
 Program Memory TypeFlash
 Program Memory (KB)1.75
 CPU Speed (MIPS) 5
 RAM Bytes 64
 Data EEPROM (bytes) 128
 Timers 1 x 8-bit, 1 x 16-bit
 ADC 4 ch, 10-bit
 Comparators 1
 Temperature Range (C) -40 to 125
 Operating Voltage Range (V) 2 to 5.5

The device can be used in a reasonable variety of projects as Windmill/Solar controllers/loggers, Water pump controllers, Stepper motor drivers, Alarms and Automotive applications, etc.

2. About our mission

For such a device, the only thing desired from actual languages/compilers on the market (commercial or freeware) is to obtain the smallest code possible, without much effort form the user. But this objective is harder and harder to attain with the modern compilators which must come with support for the most recent devices from Microchip and with the best featured library possible - I always said that these days, with the powerful microcontrollers available at competitive prices, a feature rich library is more important that the ability to produce the smallest code. A language/compiler which come with easy support for USB, SD Card, Network and USB & Network bootloaders can be the winner. Because this can also assure a large online community of users.

But what is happening with the support for our older and smaller devices? It is a common practice to make common libraries to support a large family of microcontrollers but the price is high for small devices - more and more space memory occupied from a version to another of actual compilers. Older projects can't compile on newest version of libraries/compilers.

So, let's see what is the situation for 12F675 device and Pascal like languages/compilers today. Initially, we will use a small project consisting of a small Windmill/Solar controller and later, a more complex logger application.

3, The compilers and tools used

Here are just three compilers - don't know for others.
  1. mikroPascal PRO 4.60;
  2. Pic Micro Pascal
  3. JALv2 2.4n with Jallib 0.6
The tools I used to program and test the microcontroller:
  1. Pickit2 programmer;
  2. Low Pin Count Demo board modified by me to make it more useful for 8pin microcontrollers;
  3. My Windmill/Solar controller board for live test.

4. Testing using standard libraries
The examples will use the standard ADC libraries provided by the toolchain. Again, the standard libraries are designed to provide functionality for the all supported microcontrollers.

4.1 Simple Windmill/Solar controller:
 Compiler Code space used
 Data space used
 mikroPascal PRO 4.60 610 13
 Oshonsoft PIC Basic 6.91
 460    30
 PMP* --- ---
 JALv2 2.4n 352 38
*Note: The standard library for Analog to Digital conversion from PMP can not be used on 12F675 device without modifications. Oshonsoft Basic was introduced recently just to see where is situated, compared with the others (it is the best PIC simulator in the world but as compiler not as good as PMP and JALv2)  - sorry for inconvenience.

The sources are included inside "" archive - see the attachments.

5. Testing using custom libraries/functions
The examples will use custom ADC functions, designed specially for the microcontroller in case. The advantage is obvious - no bloated code and a better optimization. As you can see in the table bellow, is the only solution when you work with such devices. The downside is that this is not for beginners...

5.1 Simple Windmill/Solar controller:
 Compiler Code space used
 Data space used
 mikroPascal PRO 4.60 587 12
 Oshonsoft PIC Basic 6.91
  451     32
 PMP 293 31
 JALv2 2.4n 27633 

The sources are included inside "" archive - see the attachments.

5.2 Windmill/Solar controller and logger:
The reference design can be found there, here will be only the firmware as a test (not sure yet, maybe first I will post there the modified project). This will not work with standard libraries so it is posted on this section only - I will try to keep the 32bit integer math for calculating required voltages. Otherwise, an adjustable voltage power supply is mandatory - no big deal but it will take some time, my variable power source is down.

--- to be completed ---

RC1602A-E LCD JAL library

posted Mar 25, 2011, 11:52 AM by Vasile Guta Ciucur   [ updated Jun 16, 2013, 1:53 AM ]

Some time ago, I bought an RC1602A-GHW-ESX LCD but I had no time for it. I intended to use it as a serial display for my laboratory so, I tried to test it in 4bit mode, to see how it works. I used first a 18F2525 but no luck. I thought is a PIC problem, so I tried with 18F2550 - didn't worked. The LCD was brand new so I didn't thought it was defective.

After a quick search on Internet, I found that it use a ST7066U processor which come in three flavors, A, B and C (AFAIK), each having a different set of characters (mine is B variant).  I used it with HD44780 libraries and that was the reason of trouble. The ST7066U processor use a different initialization procedure but this is the only (almost, second is a bigger delay after the "clear screen" command) difference between the two processors.

The testing bed (that paper with printed circuit have nothing to do with the test):

Jal libraries are attached bellow:

1-4 of 4


Recent site activity