PIC related website
Re: PIC related website
Hi, an I2c LCD library has been published: "LCD_I2c", see http://www.libstock.com/projects/view/97/lcd.
It is meant for LCD's using the PCF2116 lcd driver.
It is meant for LCD's using the PCF2116 lcd driver.
Last edited by Dany on 12 Mar 2013 19:01, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Hi,
* A new package has been entered in Libstock: "Expanders" , see http://www.libstock.com/projects/view/603/expanders. For now only one library is present in it: "PCF8574" (I2c to/from 8 bits parallel). Can e.g. be used to drive an LCD via I2c (see below).
* An extra I2c LCD library has been published: "LCD_I2c_PCF8574" , see http://www.libstock.com/projects/view/97/lcd. This library drives a standard LCD via I2c with the help of an PCF8574 I/O expander. It uses the "PCF8574" library (see above).
* A new package has been entered in Libstock: "Expanders" , see http://www.libstock.com/projects/view/603/expanders. For now only one library is present in it: "PCF8574" (I2c to/from 8 bits parallel). Can e.g. be used to drive an LCD via I2c (see below).
* An extra I2c LCD library has been published: "LCD_I2c_PCF8574" , see http://www.libstock.com/projects/view/97/lcd. This library drives a standard LCD via I2c with the help of an PCF8574 I/O expander. It uses the "PCF8574" library (see above).
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Hi,
A new package has been added in Libstock: Keypad_I2c (see http://www.libstock.com/projects/view/610/keypad-i2c).
It permits to connect an 4x4 keypad to a PIC via I2c (using a PCF8574(A) I2c expander). This saves a lot of pins, this making a keypad also possible to connect to PIC's with low pin count.
A new package has been added in Libstock: Keypad_I2c (see http://www.libstock.com/projects/view/610/keypad-i2c).
It permits to connect an 4x4 keypad to a PIC via I2c (using a PCF8574(A) I2c expander). This saves a lot of pins, this making a keypad also possible to connect to PIC's with low pin count.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Hi,
A new library has been added to the LCD package (http://www.libstock.com/projects/view/97/lcd): LCD_SPI_74Hc595.
This library drives a standard LCD via an SPI output expander (the 74HC595 or 74HCT595).
Have fun!
A new library has been added to the LCD package (http://www.libstock.com/projects/view/97/lcd): LCD_SPI_74Hc595.
This library drives a standard LCD via an SPI output expander (the 74HC595 or 74HCT595).
Have fun!
Last edited by Dany on 25 Apr 2013 20:41, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Hi, a new tool has been added to the website and LiBstock: a mikroPascal to mikroBasic source convertor, see
http://www.libstock.com/projects/view/6 ... -convertor or http://www.rosseeld.be/DRO/PIC/tools.ht ... _convertor.
This tool is a simple mikroPascal to mikroBasic source code convertor. The tool can convert complete mP units to mB modules and complete mP programs to mB programs.
Additionally the possibility exists to convert loose definitions and/or loose code (not embedded in a program or unit environment).
Documentation of the mP to mB convertor: http://www.rosseeld.be/DRO/PIC/Pascal_t ... vertor.pdf
Have fun!
Acknowledgement: Thanks to Janni for his testing effort, problem reports and improvement suggestions!
Screenshot:
http://www.libstock.com/projects/view/6 ... -convertor or http://www.rosseeld.be/DRO/PIC/tools.ht ... _convertor.
This tool is a simple mikroPascal to mikroBasic source code convertor. The tool can convert complete mP units to mB modules and complete mP programs to mB programs.
Additionally the possibility exists to convert loose definitions and/or loose code (not embedded in a program or unit environment).
Documentation of the mP to mB convertor: http://www.rosseeld.be/DRO/PIC/Pascal_t ... vertor.pdf
Have fun!
Acknowledgement: Thanks to Janni for his testing effort, problem reports and improvement suggestions!
Screenshot:
Last edited by Dany on 07 Feb 2014 12:41, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Hi, this message is for Dany, i want to use your TimeBase unit from the 'Schedulers' package. In my code, i use Janni/yo2lio's conversion and string libraries. This TimeBase library uses Danys' StringUtils, so i added the StringUtils library, but it has a conflict with the string library.
At compilation it gives error messages like this:
'Redefinition of 'memCpyC [StrngUtils.mpas] '. 'memCpyC' already defined in '__Lib_String.mpas'
Could you tell me what to do so i can use the TimeBase unit?
Thanks.
At compilation it gives error messages like this:
'Redefinition of 'memCpyC [StrngUtils.mpas] '. 'memCpyC' already defined in '__Lib_String.mpas'
Could you tell me what to do so i can use the TimeBase unit?
Thanks.
Re: PIC related website
Before Dany responds, simply try removing the uses clause in TimeBase unit. There's good chance that all needed routines are in the replacement libs and StringUtils is not necessary.
Re: PIC related website
Yes, try that please. Thanks Janni.janni wrote:Before Dany responds, simply try removing the uses clause in TimeBase unit. There's good chance that all needed routines are in the replacement libs and StringUtils is not necessary.
Some elucidation: I have still the "unpleasant" habit of putting "uses" clauses in my code (inherited from my Delphi background). It links unconditionally a unit to the usage of another one, while mP has a Library Manager and a Project Manager to indicate what other units/libraries to use.
--> In fact, the unit "Timebase" does not need StrngUtils at all, probably the uses clause was some left over of test code in the unit that was removed... Sloppy of me.
I will publish a new version of TimeBase...
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Above seems not to be true, "Timebase" uses the "MaxWord" constant out of "StrngUtils" (or the replacement of "String").Dany wrote:--> In fact, the unit "Timebase" does not need StrngUtils at all, probably the uses clause was some left over of test code in the unit that was removed... Sloppy of me.
I will publish a new version of TimeBase...
Sorry for the inconvenience.
Anyway the uses declaration in "Timebase" can be left out.
Last edited by Dany on 16 May 2013 11:20, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Wrong again. I get an error message "Maxword not defined" if I leave out the uses clause.Dany wrote:Anyway the uses declaration in "Timebase" can be left out.
This error can be eliminated by adding
Code: Select all
const Maxword: word; external;
I do not know why the error occurs... Any idea Janni?
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
I've included maxWord declaration in Math library replacement which seemed best place for it. If this replacement is not used then one may simply add the declaration (const maxWord: word = $FFFF;). Or you could use local declaration (in implementation section) in Timebase as I tend to do with libraries - not depending on users replacing complete set of libs.
This would mean either that maxWord is declared in some higher unit or that mP is miraculously extracting declaration from implementation section of String or Conversions lib replacements.This error can be eliminated by addingCode: Select all
const Maxword: word; external;
Re: PIC related website
Hi, the unit "TimeBase" (package "Schedulers") has been updated, both on Libstock and on the Website. It does not longer use "StrngUtils". I adopted the solution of Janni: define "Maxint" in the unit itself (see above post).
Sorry for the inconvenience!
Sorry for the inconvenience!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Hi, there is a new "project" added to the website and to Libstock: a "WattMeter" (powermeter) for 230Vac, max 2.5Aac, 50Hz: http://www.rosseeld.be/DRO/PIC/pic_proj ... #wattmeter or http://www.libstock.com/projects/view/7 ... ower-meter.
Documentation: http://www.rosseeld.be/DRO/PIC/WattMeter.pdf.
This Wattmeter is built with as less as components possible. It is therefor of course a little limited in range, accuracy and stability.
The meter is made for 230Vac (rms), max 2.5Aac (rms) and 50Hz, but is rather easily adaptable to other voltages, currents and frequencies. It can handle both sinusoidal and non sinusoidal voltages and currents, both with and without DC
component.
It measures:
- the Rms voltage (unit: Volt)
- the Rms current (unit: Ampère)
- the apparent power consumption (unit: VoltAmpère: VA, the product of both the rms Voltage and the Rms current). This value is also called “Complex power”.
- the real power consumption (unit: Watt) (= the one that you are going to pay for)
- the power factor (no unit, ratio of real power to the apparent power)
All values are shown on an LCD, except for the Apparent (Complex) power.
Additionally there is one push button to set the “zero” point for the AD convertors. The values of these zero
points are stored in Eeprom and recalled after startup of the PIC.
Important Warning! Safety issue: All electrical parts of the meter are connected to the
live mains supply. Do NOT touch any of those parts when the power meter is
connected to the mains outlet. Danger for Electrocution!
Also do NOT connect the circuit to e.g. a PC (via Rs232 or USB or...) because it will lead
to a short circuit, unless the mains used to feed the load is completely isolated from the actual mains power, e.g. via an isolating safety transformer.
Additions submitted by Larry Reisinger: Users should be warned not to try this with a cheap transformerless power supply. The really cheap 5v 'wall wart' power supplies aren't isolated. You need to be sure that the PS is a transformer type. They're getting hard to find.
One other possible way to power a meter like this is with a series capacitor type DC power supply. You run that directly off of the mains power, and don't worry about external power. They're limited in current, but for 50 ma, they can be reasonable.
Documentation: http://www.rosseeld.be/DRO/PIC/WattMeter.pdf.
This Wattmeter is built with as less as components possible. It is therefor of course a little limited in range, accuracy and stability.
The meter is made for 230Vac (rms), max 2.5Aac (rms) and 50Hz, but is rather easily adaptable to other voltages, currents and frequencies. It can handle both sinusoidal and non sinusoidal voltages and currents, both with and without DC
component.
It measures:
- the Rms voltage (unit: Volt)
- the Rms current (unit: Ampère)
- the apparent power consumption (unit: VoltAmpère: VA, the product of both the rms Voltage and the Rms current). This value is also called “Complex power”.
- the real power consumption (unit: Watt) (= the one that you are going to pay for)
- the power factor (no unit, ratio of real power to the apparent power)
All values are shown on an LCD, except for the Apparent (Complex) power.
Additionally there is one push button to set the “zero” point for the AD convertors. The values of these zero
points are stored in Eeprom and recalled after startup of the PIC.
Important Warning! Safety issue: All electrical parts of the meter are connected to the
live mains supply. Do NOT touch any of those parts when the power meter is
connected to the mains outlet. Danger for Electrocution!
Also do NOT connect the circuit to e.g. a PC (via Rs232 or USB or...) because it will lead
to a short circuit, unless the mains used to feed the load is completely isolated from the actual mains power, e.g. via an isolating safety transformer.
Additions submitted by Larry Reisinger: Users should be warned not to try this with a cheap transformerless power supply. The really cheap 5v 'wall wart' power supplies aren't isolated. You need to be sure that the PS is a transformer type. They're getting hard to find.
One other possible way to power a meter like this is with a series capacitor type DC power supply. You run that directly off of the mains power, and don't worry about external power. They're limited in current, but for 50 ma, they can be reasonable.
Last edited by Dany on 07 Feb 2014 12:42, edited 4 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Re: PIC related website
Hi Dany,
excellent, thanks !
excellent, thanks !
Re: PIC related website
About the Wattmeter (see back a few posts):
2013-08-07: Added documentation about modifications needed for higher currents than 2.5A~rms:
- The method with a dedicated current sensor IC (ACS...)
- The method with a series resistor and an extra amplifier
http://www.rosseeld.be/DRO/PIC/WattMeter.pdf
2013-08-07: Added documentation about modifications needed for higher currents than 2.5A~rms:
- The method with a dedicated current sensor IC (ACS...)
- The method with a series resistor and an extra amplifier
http://www.rosseeld.be/DRO/PIC/WattMeter.pdf
Last edited by Dany on 08 Aug 2013 18:00, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)