Page 1 of 1

How can I program Atmega if I have only chinese PikKit3?

Posted: Tue Nov 02, 2021 5:13 am
by Sergejs
Should I buy new programmer or can I solding electric schematic of programmer? I need programming Arduino Nano for new library of Martin made for max7219 dot matrix 8 x 8 pixels. How I understand PIC controllers do not support this amateur display.

Re: How can I program Atmega if I have only chinese PikKit3?

Posted: Tue Nov 02, 2021 7:29 am
by mnfisher
The Nano doesn't need a programmer - it is programmed via the USB port. You can also use a USBTiny or USBAsp programmer or another Arduino though this isn't a requirement with FC.

PIC 'should' work with the component - though I've never tried it (I didn't have a PIC programmer when I wrote it) - it needs an SPI port to write the data to the displays. What problems have you encountered?

One advantage of the Arduino is you can use the 5V pin to power several displays :-)

Martin

Re: How can I program Atmega if I have only chinese PikKit3?

Posted: Tue Nov 02, 2021 8:49 am
by Sergejs
How to convert *.hex to *.ino ? Arduino IDE can not write *.hex file to MCU.

Re: How can I program Atmega if I have only chinese PikKit3?

Posted: Tue Nov 02, 2021 9:00 am
by mnfisher
You can program direct from FC?

Re: How can I program Atmega if I have only chinese PikKit3?

Posted: Tue Nov 02, 2021 9:03 am
by medelec35
Hi.
As Martin said, you don't need a programmer.
The USB lead is connected from Nano to your PC.
Make sure the Nano and the port are both selected within Project options:
Nano.png
Nano.png (67.58 KiB) Viewed 3881 times
Select compile to target.
I have just programmed my Nano:

Code: Select all

Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avra.bat  "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" atmega328p "C:\Users\medel\Downloads\Flowcode1.elf" "C:\Users\medel\Downloads\Flowcode1.c" "C:\Users\medel\Downloads\Flowcode1.lst"

C:\Users\medel\Downloads>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B690411241251B4A05C2B5828F4452C9F7348705C640EF477B79E0C7881D2E5EEC9BD6FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D7958998291880A09BBE74CF7BA3F4E37F13004EE3637760F1F0B7DA0CC623CD30E3C7D6BAB4C3FE6151D92B8EC0ADD55E96639DAC02472BDE3806EF43AE3A028BD32A5DAE68BB191DA97CB6883A66D3C41849952BB2DD264AF32733E2C3050DA273BE4EEFF12703F3DAF67B119A5A5B069403B38249A6C4D8A1304B09A437E7E2D43FD26DF891DB3086C82D6 

C:\Users\medel\Downloads>REM REVISION: 1.0 

C:\Users\medel\Downloads>REM GUID: EA0828B2-5C70-41A5-8C54-F359DD5CC88B 

C:\Users\medel\Downloads>REM DATE: 29\03\2021 

C:\Users\medel\Downloads>REM DIR: FCD\AVR\batchfiles\avra.bat 

C:\Users\medel\Downloads>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\Users\medel\Downloads\Flowcode1.elf" "C:\Users\medel\Downloads\Flowcode1.c" -lm -Wl,-gc-sections 

C:\Users\medel\Downloads>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-objdump.exe" -S "C:\Users\medel\Downloads\Flowcode1.elf"  1>"C:\Users\medel\Downloads\Flowcode1.lst" 

C:\Users\medel\Downloads>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-size.exe" -B -d "C:\Users\medel\Downloads\Flowcode1.elf" 
   text	   data	    bss	    dec	    hex	filename
    284	      0	      0	    284	    11c	C:\Users\medel\Downloads\Flowcode1.elf

Compilation successful!

Using FCD settings for linker
Launching the linker/assembler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avrb.bat  "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" "C:\Users\medel\Downloads\Flowcode1.elf" "C:\Users\medel\Downloads\Flowcode1.hex" "C:\Users\medel\Downloads\Flowcode1.cof"

C:\Users\medel\Downloads>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B69041F19754DEA3580B6825E5D6A5C09874F305C640EF477B79E0C7881D2E5EEC9BD6FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D795899824EF872725113B645F175A82BBF7DF194C31451F662291FA2302B8E00B0793B98DE54674FED6890F09D29E6D6AF5F4CDA2A0B069D1A731E4BF7CAEBD6A00B6313A3554E78FBF27EB2E2AB377A2B2C9B1D3B75C13EB27ADD422C3050DA273BE4EE0394535DE0D901F49597144CF394E33BC8A5C5ECC46A5F0EA3E761B0B04467EFC0CE2C344F21BA45 

C:\Users\medel\Downloads>REM REVISION: 1.0 

C:\Users\medel\Downloads>REM GUID: C4F77EBB-EDB0-4261-B01E-F0B1AB94E03A 

C:\Users\medel\Downloads>REM DATE: 29\03\2021 

C:\Users\medel\Downloads>REM DIR: FCD\AVR\batchfiles\avrb.bat 

C:\Users\medel\Downloads>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avr-objcopy" -O ihex -R .eeprom  "C:\Users\medel\Downloads\Flowcode1.elf" "C:\Users\medel\Downloads\Flowcode1.hex" 

HEX file creation successful!

Using FCD settings for programmer
Launching the programmer...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\AVR\batchfiles\avrc_arduinoA.bat  "C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\" m328p arduino COM18 57600 "C:\Users\medel\Downloads\Flowcode1.hex"

C:\Users\medel\Downloads>REM CRC: EA277D0C7EF9B4E537B79187D0BE7A25FA6080B4B01BE48BAF713429E4B69041072C26934F62BA2AD18E3139D88C14D7BD8C8CEEE570C34335B9BD40DC91ABF9F6A4CCB7873802B223E4F4A1008A3591FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D79589982ACF9C651DE9EEE6B2C2BCACE9467A07961E9396118791606FB531939F6539CFCA719F5A675CCBEE4B35B6B3E06A3B6EA1F1C802F1E0729A39B031A08340CB3AD07D220268868A23DD35657CD8CE9A282EF4678980A2C5F4D2C3050DA273BE4EE29956884B1FB575DFD3894D13ADA1E109287F1E6B0940B29850400E5B608E745107C571680B732A8 

C:\Users\medel\Downloads>REM REVISION: 1.0 

C:\Users\medel\Downloads>REM GUID: BC89C337-8FBB-43B7-A3A7-C7902C121931 

C:\Users\medel\Downloads>REM DATE: 29\03\2021 

C:\Users\medel\Downloads>REM DIR: FCD\AVR\batchfiles\avrc_arduinoA.bat 

C:\Users\medel\Downloads>"C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5\bin\avrdude.exe" -pm328p -PCOM18 -b57600 -carduino -D -Uflash:w:"Flowcode1.hex"                      

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% -0.00s

avrdude.exe: Device signature = 0x1e950f
avrdude.exe: reading input file "Flowcode1.hex"
avrdude.exe: input file Flowcode1.hex auto detected as Intel Hex
avrdude.exe: writing flash (284 bytes):

Writing | 
################################################## | 100% 0.11s

avrdude.exe: 284 bytes of flash written
avrdude.exe: verifying flash memory against Flowcode1.hex:
avrdude.exe: load data flash data from input file Flowcode1.hex:
avrdude.exe: input file Flowcode1.hex auto detected as Intel Hex
avrdude.exe: input file Flowcode1.hex contains 284 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################
################################## | 100% 0.08s

avrdude.exe: verifying ...
avrdude.exe: 284 bytes of flash verified

avrdude.exe done.  Thank you.


Programming successful!


FINISHED
If the Port is not listed, then check you have the correct drivers installed for CH340.
You may need to reload Flowchart after installing drivers.

Edit: Posted at a similar time.

Re: How can I program Atmega if I have only chinese PikKit3?

Posted: Tue Nov 02, 2021 9:47 am
by Sergejs
I will try now! Thank very much!!!