Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Programming PIC18 using function blocks and a graphical IDE

Status
Not open for further replies.
Dear LOURENS,
How can we do less digit after decimal point in block no 152 RANGE TRANSFORM INT/ FLOATING POINT.Because in LCD display it took 6 digit .Like 65.10234
but we need only one ore two digit after decimal point .Like 65.1.
Second plz for Lcd disply it is better if make X,Y position for data instead of hex position . THANKs
 
Hi Noreen, FP values occupy 11 positions on LCD if you use FB145. I have no hardware available to test but you could try using after FB145 a FB146 to display a string consisting of a few space characters positioned such that it overlap the digits you don't want to see. This is not a very elegant method with limited application. In the next version I will include a selection for 1, 2, 3, or max (as current) digits after decimal point in the GUI for FB145. You can also temporary modify the source code for your specific application, which is not to difficult as you only need to insert a subroutine call. Let me know if you require details.
I don't know how much work is involved to use X, Y positioning because there are different LCD layouts. Will have a look - but in the mean time you will have to study those datasheets!
 
Hi, ver2.10 of VPSP_18 is available for those interested in making their own plc controllers. This version can now be used as I2C slave. The uploaded file will give you an indication of what is in the function block library and with the link you can download the Documentation and installation file, the latter in directory Ver2_10. With this version it is no longer required to register to be able to use unlimited nr of code pages.
Wishing you all a good 2015

https://www.dropbox.com/sh/lukcg8wot51ircm/AAC9RG5oxeSXavDLNO2kctpTa?dl=0
 

Attachments

  • FUNCTION_BLOCK_INDEX.pdf
    401 KB · Views: 423
Hi ,
LOURENS,
THANKS for new ver2.10 of VPSP_18.but the problems same as i mention thread NO 41.plz add an lcd simulator
plz plz add some pic more like pic 16f88 ,16f676,16f876A and 16f877A ,I am glad to see this.MR LOURENS can you gave me the sours code .
my mail address is .murtazeng@gmail.com
THANKS again
 
Hi Noreen, the attached file will tell you how to change the number of digits displayed. About an lcd simulator we will have to see ................
The 16f pics do not have the horse power for VPS (my opinion). You mention source code.....look in C:\LLG_CB\ where you will find all the pic assembler source code for all function blocks, and much more. The VPS IDE was developed using VB10 of which the source is about 40MB. I doubt if this will be of interest to you. Regards, Lourens
 

Attachments

  • LCD_NUMBER_OF_DECIMALS.pdf
    85.1 KB · Views: 279
Hi Noreen, long time no hear. Things ok on my side. I include a project file. You must change the .txt extension to .lcb before you can load it into VPS. Ignore the first code page. On the second code page is an example of how to divide a number (0....999) into 100's, 10's and 1's and then use 3 pattern select blocks (FB107) to drive the segments of the displays. As per the notes on 2nd code page if your do not have available 21 outputs on your application then use FB24 with a 74LS595 chip for each digit. This way you only require 5 output pins for the 3 digits. Note that this application do not cater for negative numbers or leading zeros blanking. Just run the project in the VPS simulator then you can see how it works.
Regards Lourens.
 

Attachments

  • GreenHouse.txt
    17.8 KB · Views: 249
Hi Noreen, the attached pdf shows an FB program for driving a 2 digit 7-segment display. The displays are common cathode. The FB's execution order is important and this code must be executed in a time task. I found if execution is slower than 10mSec then flicker is no good. Have not tried it with more than 2 digits but you might give it a go. I have corrected a bug in FB149 and fixed the scroll problem so now you can scroll down to see the bottom status/info line. You can download v2.12 and documentation using the following link

https://www.dropbox.com/sh/lukcg8wot51ircm/AAC9RG5oxeSXavDLNO2kctpTa?dl=0
 

Attachments

  • Doc1.pdf
    99 KB · Views: 222
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top