Recent

Author Topic: AVRPascal – free code editor for FPC for AVR  (Read 38408 times)

ccrause

  • Hero Member
  • *****
  • Posts: 1080
Re: AVRPascal – free code editor for FPC for AVR
« Reply #150 on: August 03, 2025, 10:54:07 am »
@ccrause,
Yes, it is possible. I modified slightly usb.pas to be more compatible with Arduino source (attached) but I'm not sure if it will help. Have you tried writing a similar test program to the Arduino Sketch to make sure that Arduino code is working correctly? What are the connections in your test environment (I mean hardware and circuit)?

PS. I am using Arduino 1.8.19

I'm using a Leonardo board for testing.  To test the hardware serial I use a USB-serial converter connected to pins 0 and 1 (not that the hardware serial should be a consideration here).  Below an Arduino sketch that works as expected (built in Arduino 1.8.15):
Code: C  [Select][+][-]
  1. #define LEDpin 8
  2.  
  3. void setup() {
  4.   // On Leonardo this is the USB-CDC serial:
  5.   Serial.begin(9600);
  6.   while (!Serial) {}
  7.  
  8.   pinMode(LEDpin, OUTPUT);
  9.   digitalWrite(LEDpin, HIGH);
  10. }
  11.  
  12. void loop() {
  13.   if (Serial.available() > 0) {
  14.     digitalWrite(LEDpin, !digitalRead(LEDpin));
  15.     Serial.write(Serial.read());
  16.   }
  17. }

PS: I typically use CuteCom as serial monitor on Linux, and I noticed that if the RTS and DTR signals are disabled then the Arduino CDC serial does not write to host, because of the lineState check in the code.  Same gotcha in GTKTerm.  Ensure that either DTR or RTS is set in the receiving client's serial setup when expecting USB-CDC serial data from the Arduino implementation.

ccrause

  • Hero Member
  • *****
  • Posts: 1080
Re: AVRPascal – free code editor for FPC for AVR
« Reply #151 on: August 03, 2025, 11:23:22 am »
I modified slightly usb.pas to be more compatible with Arduino source (attached) but I'm not sure if it will help.

Tested the new usb.pas, same problem with sending data from Leonardo.

ackarwow

  • Full Member
  • ***
  • Posts: 162
    • Andrzej Karwowski's Homepage
Re: AVRPascal – free code editor for FPC for AVR
« Reply #152 on: August 03, 2025, 11:43:46 pm »
@ccrause,
Here are corrected version of usb.pas and my test program. Sending data to USB should work.

ackarwow

  • Full Member
  • ***
  • Posts: 162
    • Andrzej Karwowski's Homepage
Re: AVRPascal – free code editor for FPC for AVR
« Reply #153 on: August 17, 2025, 07:00:46 pm »
A new version of AVRPascal (3.3) has been released.
As always, it's available for download on my webpage (http://akarwowski.pl/index.php?page=electronics&lang=en).

Changes:

New version of UnoLib (1.1, see https://sourceforge.net/projects/unolib/ for details)
New features:
- added the "Add conditional directive for current device" option to the New File dialog box
- automatic renaming of the program/unit name after saving a file with a new name
- new options in Serial Port Monitor window: "line ending" (No, NL, CR, NL&CR) and "mode" (Ascii, Hexadecimal) (thanks to @Dzandaa for suggestions)
- improved installer for Linux, now AVRPascal appears in "Programming" section (thanks to @Dzandaa for suggestions) 
Bug fixes:
- fixed problems with reading data in Serial Port Monitor (thanks to Christof Biner for detailed description of the problem)
- minor aesthetic changes in Upload window

The PDF manual will be updated in a few days.

ackarwow

  • Full Member
  • ***
  • Posts: 162
    • Andrzej Karwowski's Homepage
Re: AVRPascal – free code editor for FPC for AVR
« Reply #154 on: August 24, 2025, 10:00:55 am »
The manual, updated with the new features of AVRPascal 3.3, is available on my website.
I have also prepared a short "How to start" guide for beginners (attached). Please let me know if anything is missing or needs to be corrected.

ackarwow

  • Full Member
  • ***
  • Posts: 162
    • Andrzej Karwowski's Homepage
Re: AVRPascal – free code editor for FPC for AVR
« Reply #155 on: August 26, 2025, 06:19:23 pm »
AVRPascal now is also on Reddit (https://www.reddit.com/r/avrpascal/). I invite everyone interested in news and discussion about this program. :)

 

TinyPortal © 2005-2018