Recent

Author Topic: Lazarus USBasp serial window on demand  (Read 7224 times)

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: Lazarus USBasp serial window on demand
« Reply #15 on: April 10, 2020, 08:00:05 pm »
Hi,

 I just fixed some GUI logic bugs and currently the serial monitoring synchronization with the IDE is adequate .

 I tested it mimicking an arduino like workflow ( close port before run / upload via custom command and reopened it after finishes )  and works stable.

  Next step is to switch to serial.pp and to think what features I'll add .


< snip >

I'm watching this thread carefully, so please yell if you have problems.

< snip >


 Thank you for your offer, MarkMLl . I really appreciated it.

regards,

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: Lazarus USBasp serial window on demand
« Reply #16 on: April 11, 2020, 11:52:31 am »
Hi,

  it was suggested to me to create a github repository . So here it is https://github.com/dioannidis/lazserialmonitor, a mirror repository for the github aficionados ;) .

regards,

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: Lazarus USBasp serial window on demand
« Reply #17 on: April 12, 2020, 03:54:18 pm »
Hi,

  a little screenshot showing the app ( precompiled binary for win64 here using libusb-1.0.23 ) connected to a USBasp programmer via USB ( with the usbasp-uart firmware loaded ) .

  The programmer is connected to an atmega328p + enc28j60 custom pcb , running the demo fp_ethernet_enc28j60 firmware ( mirror github repository ) sniffing my network ( only arp packets at the moment ).

regards
« Last Edit: April 12, 2020, 06:05:39 pm by Dimitrios Chr. Ioannidis »

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: Lazarus USBasp serial window on demand
« Reply #18 on: April 15, 2020, 07:04:38 pm »
Hi,
 
  I don't know if anyone tried the firmware and this little utility but I had some free time today so ...

Changelog
  • The communication to USBasp is moved to a thread.
  • Added bottom AutoScroll feature for the display.
  • Added TimeStamp feature ( milliseconds ? ) but only when the linebreak is CRLF.
  • Added screen buffer size ( lines ).
  • Added a simple parser for line break CRLF.

https://github.com/dioannidis/libUSBUARTTerminal

regards,

Mathias

  • Jr. Member
  • **
  • Posts: 88
Re: Lazarus USBasp serial window on demand
« Reply #19 on: April 16, 2020, 02:20:33 pm »
The USBasp is a SPI programmer for AVRs.
How is it possible that the UART can?
Did you have the Atmega8A unprogrammed?

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: Lazarus USBasp serial window on demand
« Reply #20 on: April 16, 2020, 02:49:08 pm »
Hi,

The USBasp is a SPI programmer for AVRs.
How is it possible that the UART can?

I flashed it with the usbasp-uart firmware .

From usbasp-uart firmware repository ( https://github.com/akrasuski1/usbasp-uart ).

"This repository contains a modification to latest (2011) USBasp firmware. According to official schematic, the UART lines of the ATmega are connected to the ISP socket, however the firmware did not seem to use them. UART is often used as main debug element in embedded programming, so having ISP programmer double as debugging unit would save much time for amateurs.

I modified official USBasp code and added UART capabilities. "

regards,

Mathias

  • Jr. Member
  • **
  • Posts: 88
Re: Lazarus USBasp serial window on demand
« Reply #21 on: April 16, 2020, 03:58:35 pm »
I will leave my USBasb in its original condition.

For such purposes I use an Arduino Nano, which has UART already built into the USB.

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: Lazarus USBasp serial window on demand
« Reply #22 on: April 20, 2020, 08:25:33 pm »
Hi,

  update post :

Changelog
  • Removed GUI logic from library.
  • After connecting to device displayed the product, manufacturer, serial number and if it's firmware supports TPI and/or UART.
  • Added threads for RX and TX.
  • Refactored to support selecting from multiple USBasp devices.
  • Refactored UART feature added support for activation / deactivation.
  • ( preparing to use the library for programming mcu's via USBasp without the use of avrdude using code from the ccrauce's utility importATDF for mcu's informations ...... )
  • Various tweaks, fixes ...


  https://github.com/dioannidis/libUSBUARTTerminal

regards,
 
« Last Edit: April 20, 2020, 08:38:33 pm by Dimitrios Chr. Ioannidis »

d.ioannidis

  • Full Member
  • ***
  • Posts: 221
    • Nephelae
Re: Lazarus USBasp serial window on demand
« Reply #23 on: April 23, 2020, 01:34:36 pm »
Hi,

  it took me a while but the first beta is online :)

  https://github.com/dioannidis/libUSBUARTTerminal

  USBaspUARTTerminal is a standalone application, that connects to a UART enabled USBasp programmer ( running the usbasp-uart firmware ( https://github.com/akrasuski1/usbasp-uart ) ).

  If you play / experiment with standalone ( i.e. breadboard, custom board ... ) avr mcu's you don't need anymore an extra UART->USB converter device. 

  In my tests, I couldn't get reliable data stream ( loosing a byte here and there ... ) with a baudrate of 57600 and more. But for my use, quick UART debugging, using 38400 baudrate is more than adequate.

  I uploaded windows binaries ( and64, i386 ) and made the project able to compile in official Lazarus 2.0.8 ( I'm using fpc and lazarus trunk for development .... ) .

  Next steps is to integrate the USBasp library to the LazSerialMonitor package and extend it to program the avr mcu's ( SPI, TPI ) directly ;) .

regards,

 

TinyPortal © 2005-2018