Recent

Author Topic: PicPas, Pascal compiler for Microchip PIC  (Read 88837 times)

Edson

  • Hero Member
  • *****
  • Posts: 1125
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #210 on: September 11, 2020, 11:13:23 pm »
Hi.

I think I must migrate to *.po format in the project. It's i just don't know how to start. My objective is to be able to change the language in a simple way as it's doing now, from settings form and in runtime.

Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

jc99

  • Hero Member
  • *****
  • Posts: 544
    • My private Site
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #211 on: September 12, 2020, 01:05:12 am »
In my GitHub-Repository is a Project called Prj_PicPas2Po, I use it to extract and import .po files to your Language-folder files.
Look under /Diverses  /FPC and /source/PicPas2Po.
Inside there is a unit 'unt_pofile.pass' that handles the .po files.
« Last Edit: September 12, 2020, 01:07:56 am by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Edson

  • Hero Member
  • *****
  • Posts: 1125
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #212 on: September 12, 2020, 04:48:11 am »
Thanks for the information. I will check.
Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

K155LA3

  • New member
  • *
  • Posts: 9
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #213 on: November 14, 2020, 09:05:47 pm »
I use PicPas 0.9.0 and an error occurred when trying to use loops:
Code: Pascal  [Select][+][-]
  1. uses PIC12F629;
  2. ...
  3. var
  4.   i: byte;
  5. ...
  6. begin
  7.    ...
  8.   for i := 0 to 7 do
  9.     CLKPin := 0;
  10.     CLKPin := 1;
  11.   end;
  12. end;
  13.  
Error for string "for i := 0 to 7 do": Illegal Operation: (byte):=(bit). But everything worked fine in version 0.8.4, which I used before.
I tried to change it to "for i := $00 to $07 do" but got the same error.

Edson

  • Hero Member
  • *****
  • Posts: 1125
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #214 on: November 15, 2020, 02:42:54 am »
Hi. Version 0.9.0 is experimental. Work in progress.

Please use the previous version.
Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

K155LA3

  • New member
  • *
  • Posts: 9
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #215 on: December 04, 2020, 11:36:28 pm »
Thanks. In version 0.8.8 this bug is gone. But the "Range check error" error appeared when checking the condition:
Code: Pascal  [Select][+][-]
  1. if (KEY_Select and %00001111) > %00000001 then
  2.  
If you write the condition in this way, the error disappears:
Code: Pascal  [Select][+][-]
  1. if KEY_Select and %00001111 > %00000001 then

Edson

  • Hero Member
  • *****
  • Posts: 1125
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #216 on: December 05, 2020, 05:47:56 am »
Fixed.

Please update from GitHub.
Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

K155LA3

  • New member
  • *
  • Posts: 9
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #217 on: December 05, 2020, 11:17:55 pm »
Thanks. Works fine.

eny

  • Hero Member
  • *****
  • Posts: 1617
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #218 on: December 07, 2020, 07:48:26 pm »
Wanted to give picpas a try (translating a small proton basic program).
However seems some dependencies are missing (or I'm doing something wrong - not impossible ;) ).
SynFacilHighlighter, also not in the project dependencies, SynFacilUtils, MisUtils, XpresBas.
I tried 0.8.8.
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

Edson

  • Hero Member
  • *****
  • Posts: 1125
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #219 on: December 08, 2020, 04:00:02 am »
Hi.

I've included the libraries in the project to avoid download individually.

Just download the from the Github: https://github.com/t-edson/PicPas
Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

eny

  • Hero Member
  • *****
  • Posts: 1617
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #220 on: December 08, 2020, 10:01:14 pm »
Great! Working now  :D
(Only a warning on a missing Devices18 folder; but still starts.)
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

zj

  • Newbie
  • Posts: 1
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #221 on: January 14, 2021, 03:40:20 pm »
Hello, great work  :),
Is {$CONFIG2 ...}  implemented in Enhanced Mid-range Compiler in version 0.8.8 ?

program FT290_display_2;
uses PIC16F1939;
{$FREQUENCY 8MHZ}
{$CONFIG _FOSC_INTOSC, _WDTE_OFF, _PWRTE_OFF, _MCLRE_OFF, _CP_OFF, _CPD_OFF, _BOREN_ON, _CLKOUTEN_OFF, _IESO_OFF, _FCMEN_ON}
{$CONFIG2 _WRT_OFF, _VCAPEN_OFF, _PLLEN_ON, _STVREN_ON, _BORV_LO, _LVP_ON}
...
FT290-display-2[29,3] Error: Unknown directive: CONFIG2

Regards, ZJ


Edson

  • Hero Member
  • *****
  • Posts: 1125
Re: PicPas, Pascal compiler for Microchip PIC
« Reply #222 on: January 15, 2021, 08:05:51 pm »
Hello, great work  :),
Is {$CONFIG2 ...}  implemented in Enhanced Mid-range Compiler in version 0.8.8 ?

program FT290_display_2;
uses PIC16F1939;
{$FREQUENCY 8MHZ}
{$CONFIG _FOSC_INTOSC, _WDTE_OFF, _PWRTE_OFF, _MCLRE_OFF, _CP_OFF, _CPD_OFF, _BOREN_ON, _CLKOUTEN_OFF, _IESO_OFF, _FCMEN_ON}
{$CONFIG2 _WRT_OFF, _VCAPEN_OFF, _PLLEN_ON, _STVREN_ON, _BORV_LO, _LVP_ON}
...
FT290-display-2[29,3] Error: Unknown directive: CONFIG2

Sorry.

Enhanced Mid-range series is a recent feature. There are still more features to complete. Collaborations are welcome.

Lazarus 2.0.10 - FPC 3.2.0 - x86_64-win64 on Windows 8

 

TinyPortal © 2005-2018