Go Down

Topic: Looking for collections of old Wiring Boards (2008 to 2010) (Read 1 time) previous topic - next topic


Mar 14, 2018, 12:14 pm Last Edit: Mar 16, 2018, 06:37 am by pert Reason: Add link to issue report for bootloader problem
Well I went ahead and pushed my package to GitHub, even though it's still under development. It seems kind of silly for you to duplicate the work I've already done.

I'm in the middle of testing right now. The WiringS and WiringSPlayShield boards/variants/bootloaders are tested but I just started testing on Wiring1/1.1 so there are likely to be a couple changes there in the next few hours. I don't own the ATmega1281 so I won't be able to test that but I do own ATmega644P, ATmega128A, and ATmega2561.

The huge problem I've encountered is with the Wiring bootloader. I am using the bootloaders from the Wiring repository:
I've uploaded many sketches without problems but when I upload this one:
Code: [Select]
void setup() {

void loop() {}

The upload hangs:
Code: [Select]
C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -V -patmega128 -cwiring -PCOM9 -b115200 -D -Uflash:w:C:\Users\per\AppData\Local\Temp\arduino_build_279350/wiring_upload_fail.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM9
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega128
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    12    64    0 no       4096    8      0  9000  9000 0xff 0xff
           flash         33     6   128    0 yes    131072  256    512  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Wiring
         Description     : Wiring
         Programmer Model: STK500
         Hardware Version: 15
         Firmware Version Master : 2.10
         Topcard         : Unknown
         Vtarget         : 0.0 V
         SCK period      : 0.5 us
         Varef           : 0.0 V
         Oscillator      : Off

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9702 (probably m128)
avrdude: reading input file "C:\Users\per\AppData\Local\Temp\arduino_build_279350/wiring_upload_fail.ino.hex"
avrdude: writing flash (1450 bytes):

Writing | ################################################## | 100% 0.23s

avrdude: 1450 bytes of flash written
avrdude: stk500v2_recv(): checksum error
avrdude: stk500v2_ReceiveMessage(): timeout

Here's the end of the -v -v -v -v output:
Code: [Select]
avrdude: safemode read 3, efuse value: fd
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:D4, L:F7)
avrdude: Send: . [1b] : [3a] . [00] . [03] . [0e] . [11] . [01] . [01] = [3d]
avrdude: Recv: . [1b]
avrdude: Recv: : [3a]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [0e]
avrdude: Recv: . [11]
avrdude: Recv: . [00]
avrdude: Recv: . [f0]
avrdude: stk500v2_recv(): checksum error

There are no problems when I use the optiboot bootloader. It makes me think it's something like the Mega bootloader used to have where if your sketch had a string with !!! it would go into "terminal mode". Anyone have any ideas about this? I'd think it would be a common topic in the Wiring forum but there's nothing for that error message.

Of course Optiboot is the better solution but my whole idea is to add support for existing Wiring boards and I'd rather that people could use them as-is instead of needing to burn the bootloader just to get started.

EDIT 2018-03-15:
More details on the Wiring bootloader issue:


So, @Crossroads... You manufacture and sell boards.  Just out of curiosity, given an existing open-source HW design that included EAGLE PCB/Schematic, how many (assembled, or perhaps partially assembed) boards would someone have to bulk order for it to be worth your while to build them, assuming that the chances of additional sales were relatively slim?


Follow on orders, or lack there of, is not a problem. OP was looking for 60 boards. 60 would be tedious to assemble by hand, I'd farm the assembly out for that. I'd make some on developing the PL, coordinating it all, to do the work. I do that all the time.  Place like Screaming Circuits has on-line quoting system, they'll buy the parts from a supplied PL with Digikey part numbers, buy PCBs from Sunstone I think, and do the assembly. I think they'll also accept  your PCBs and supplied parts and do the assembly.  price varies for what is to be done.  I've had customers buy full up assemblies of boards I've designed.
I never used China for assembling any of my own designs, that'd be another route.  Just slower with the overseas shipping, and who knows where parts are coming from.
I've also used a place in CA that will assemble small batches as fill-in kind of work I think. I had to drop ship everything from Digikey and Mouser, they did their own stencil.
So there are a lot of options for getting assembled boards.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


Well I went ahead and pushed my package to GitHub
Thanks.  Out of curiosity, is there a particular reason you chose to do this as a separate package, rather than merging it into MegaCore?


I proposed just that back in 2016 but MCUdude declined the offer:
That was right around the time when the story about Hernando Barragán, Wiring, and Arduino was getting a lot of publicity and there was more interest in Wiring so it seemed like it would be a good idea to add support for the old Wiring boards if only as a tribute to the roots of Arduino. I did end up adding support for these boards to another package I was helping with and I know I brought it up again when ATmega1281 and ATmega2561 support was added to MegaCore, though I can't find that conversation now.

So I decided to create my own package that just referenced MightyCore and MegaCore. At that time Megacore didn't have ATmega1281 and ATmega2561 support so it was going to be a bigger job than it is now. I didn't own any of the hardware I needed to test with and didn't have hobby funds to spare for parts I had no plans to actually use in a project. So it ended getting put on the backburner even though it was practically finished.

Since that time, some of the pieces have fallen into place with MegaCore adding support for ATmega1281 and ATmega2561 and me having acquired an ATmega644P and one of MCUdude's nice dev boards with an ATmega128A. The board came with some extra bare daughterboards so I bought an ATmega2561 but had been putting it off due to not being confident in my SMT soldering skills on the TQFP-64 package.

Now this thread got me thinking that I really needed to just get the project done and publish it. I have a bad habit of getting distracted at the home stretch of a project and never quite getting it to a "finished" state. I did manage to pull off the soldering without too much trouble!

Unfortunately I've hit this bootloader issue. I got caught back up on work today so I have some time to try to investigate it more tonight. I verified that the same thing happens if I upload the .hex file generated by the Arduino IDE using the avrdude version shipped with Wiring but that if I compile the same sketch in Wiring then there is no problem with the upload.


I'm really happy with the way the USB Module I used fits on the board.  The module i 16x16mm, which means it's only slightly bigger than JUST the full-sized USB-B connector.  And it has the USB/Serial plus power and "data" LEDs...



Seems to work fine on the m128 board.  Aside from the "PWM" pins that are labeled  48-53, but aren't.  (they aren't in the Tinah or original Wiring code, either.)


Well that is really confusing. I based my variant on https://github.com/WiringProject/Wiring/blob/master/framework/hardware/Wiring/Wiring1/BoardInfo.txt which shows header pins 48-53 connected to PG0-PG5. Physical pin 1 is actually PEN on the ATmega128, not PG5 but that pin is PG5 on the ATmega1281/2561.

Now I look at the schematic for the Wiring V1.0 board:
and it shows that header pins 48-53 are connected to B5-7, E3-5, which are the PWM pins but are also broken out to other headers. The PORTG pins aren't broken out at all on the schematic. Does the board match the schematic?


Does the board match the schematic?
Ah.  I may be mistaken about the "numbered 48-53" part; it looks like I may have been "influenced" by the Sparkfun board when I created those, or something.   They're definitely used as "PWM" in the Tinah board and show that way on the old Wiring photos, and are not connected to the PGx pins.  (keep in mind that the m128 only has 3 pins on PG, not including the 32kHz crystal.)   There's two pins over near the ISP connector with PG1 and PG2. (and PG0 is the BUILTIN_LED.)

I've now (partially) built a 1281-based board, and it seems to work too.  (programs via ISP, burns optiboot (from your board file; MCUDude's modified version), runs Blink...)   The SMT soldering is getting easier with practice.


OK, it's clear now. I think it makes sense to define pins 48-52 for the Wiring V1.0 (as Wiring did) because the picture of the Wiring V1.0 board on their website shows the 32 kHz crystal is not populated and someone wanting more pins could always use those pads for IO pins. If you do any revisions to your board maybe you could consider adding pin number labels to the silkscreen on the PG1/PG2 pins and the 32 kHz crystal footprint.

I'm glad to hear you tried it with the ATmega1281 since that's the only one I don't own. It's on my shopping list but I might wait to get one with my next Digikey/Mouser order instead of doing the China thing.


Thus far I'm working with "samples"; the chips I bought haven't arrived yet.

Go Up