Forum > Embedded - AVR

AVRPascal – free code editor for FPC for AVR

<< < (33/34) > >>

ackarwow:
Many thanks for your feedback, @ccrause! Regarding your points:


--- Quote from: ccrause on December 26, 2025, 07:32:29 am ---The circuit as shown will only work with a programmer attached.  This is of course the lowest parts count solution, but maybe add a discussion on what is required to make this a standalone project not connected to the USBASP (power connections, bypass capacitor requirements, function of PB5/RESET and why a pullup resistor is required in general).

--- End quote ---
Of course. I will clarify that this setup relies on the programmer for power. Making stand-alone device is probably a good idea for one of the next lessons to not complicate the issue for absolute beginners.


--- Quote from: ccrause on December 26, 2025, 07:32:29 am ---The required fuse settings to use PB5 as digital IO is not discussed. The default fuse setting from factory is that PB5 functions as the chip's reset pin. I would not suggest changing the reset pin to IO mode, since that will then require high voltage programming.

--- End quote ---
Yes, thank you. I will add this information as a footnote. Without the transistor, I agree it's much better to leave PB5 solely for reset purposes to avoid the need for high-voltage programming.


--- Quote from: ccrause on December 26, 2025, 07:32:29 am ---I suggest adding a pulldown resistor to the MOSFET's gate, since it has some capacitance that could keep the MOSFET switched on when the gate voltage is removed.

--- End quote ---
You are right about the gate capacitance. I will consider adding a footnote about that to keep the hardware setup as simple as possible for the first lesson. Re-doing all the photographs and diagrams for a non-critical (in this specific setup) resistor would be a huge task, but I think a technical note will be good enough.


--- Quote from: ccrause on December 26, 2025, 07:32:29 am ---Regarding the programming header IDC10 connector: perhaps also mention that a 6 pin variant exists.

--- End quote ---
Yes, that's another excellent point for a footnote.


--- Quote from: ccrause on December 26, 2025, 07:32:29 am ---Minor issue, calling the program "blink" when its purpose is just to switch the LED on is misleading  ;)

--- End quote ---
Yes. The program should be named "LEDOn" or in similar way :)


--- Quote from: ccrause on December 26, 2025, 07:32:29 am ---Correction: the internal RC oscillator operates at nominally 9.6  or 4.8 MHz

--- End quote ---
Yes, that's a good technical detail to include in a footnote.


--- Quote from: ccrause on December 26, 2025, 07:32:29 am ---Suggestion for next tutorial: add momentary switch and read switch state to toggle LED on/off. Requires a discussion of pull-up or pull-down pins, internal/external resistors, mechanical switch debouncing etc.

--- End quote ---
Actually, most of your suggestions for the next lesson (like internal pull-ups, debouncing, and button handling) are already covered in Lesson 3 of the course. I have already published it in Polish (there are 4 lessons at the moment), and the English translation is on the way.

Thank you again for your comments, I will take them into account in the next version of the lesson.

ackarwow:
Hi everyone, here is the updated version of Lesson 1 :) Many thanks to @ccrause.

ackarwow:
Hi everyone,

I’ve finished the English translation of Lesson 2 of “AVR Microcontroller Engineering with Pascal”.
The PDF and the source code in ZIP format are attached.

Curt Carpenter:
Bought a $1 clone Arduino Nano module to give AVRPascal a try.  Works great! 

My cookbook once a program's .hex file has been created (the example TestBlink.Pas provided is an excellent place to start).

Navigate to View>Options>Uploader
Set Verbosity 4 (just to see what happens -- change it to something else later)
Set Define baud rate 57600  (Important to be able to connect to my clone Nano module)
Check the Define baud rate check box
Check Show command line check box
In "Supported USB devices" list, select Arduino Nano
Click OK
Navigate to Run>Upload
Set Port to /dev/ttyUSB0
Set Device ATmega328P
Click OK

Thank you ackarwow -- looking forward to playing with this!
(Hope I recorded the steps correctly)

ackarwow:

--- Quote from: Curt Carpenter on January 18, 2026, 08:58:42 pm ---Bought a $1 clone Arduino Nano module to give AVRPascal a try.  Works great! 

My cookbook once a program's .hex file has been created (the example TestBlink.Pas provided is an excellent place to start).

Navigate to View>Options>Uploader
Set Verbosity 4 (just to see what happens -- change it to something else later)
Set Define baud rate 57600  (Important to be able to connect to my clone Nano module)
Check the Define baud rate check box
Check Show command line check box
In "Supported USB devices" list, select Arduino Nano
Click OK
Navigate to Run>Upload
Set Port to /dev/ttyUSB0
Set Device ATmega328P
Click OK

Thank you ackarwow -- looking forward to playing with this!
(Hope I recorded the steps correctly)

--- End quote ---

Hi Curt,

Thank you for your feedback - this is especially valuable for Arduino Nano clone users. I may add a short dedicated section to the FAQ based on your findings.

In fact, this is a good result of your experience and the solid foundations provided by FPC and avrdude, which AVRPascal uses. :)

Good finding, and thank you for sharing your solution!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version