Go Down

Topic: ATtiny841 - Default SPI (ISP) pins? (Read 239 times) previous topic - next topic

Johnny010

I want to program an ATTiny841 using the ISP pins (Using a USBASP programmer).

Looking at the datasheet, on PORTA, there are 2 sets of MOSI,SCK and MISO...
Are they simply broken out to allow easier/optional PCB routing...or are there 2 sets of?
If there are 2 sets, which do I use for ISP using a USBASP programmer?

Thanks!

841 datasheet

DrAzzy

#1
Sep 18, 2017, 07:36 pm Last Edit: Sep 18, 2017, 07:37 pm by DrAzzy
You use the PA4/PA5/PA6 pins for ISP programming.

You also use those pins for normal SPI operation unless you've remapped them to the other set of pins. See section 17.5.4 in the datasheet for details on the REMAP register as applies to SPI.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Johnny010

You use the PA4/PA5/PA6 pins for ISP programming.

You also use those pins for normal SPI operation unless you've remapped them to the other set of pins. See section 17.5.4 in the datasheet for details on the REMAP register as applies to SPI.
Thank you!

I think I have kept my board as simple as possible. This looking right?





DrAzzy

No major issues. A few things give me pause there:

*The decoupling cap appears to be on the rear of the board. Why? Put it on the top, you have the space. No need to make the paths to your decoupling cap longer than they need to be for no reason.
* I'd pull up reset with a 10k not 100k - at 100k, why bother? The on-chip pullup is stronger than that.
* Why two 100uf electrolytic caps? I don't see a compelling reason for more than one.
* If possible, you want all SMD parts on one side (for manufacturability)
* Why not use a ground plane on both sides?
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Johnny010

No major issues. A few things give me pause there:

*The decoupling cap appears to be on the rear of the board. Why? Put it on the top, you have the space. No need to make the paths to your decoupling cap longer than they need to be for no reason.
* I'd pull up reset with a 10k not 100k - at 100k, why bother? The on-chip pullup is stronger than that.
* Why two 100uf electrolytic caps? I don't see a compelling reason for more than one.
* If possible, you want all SMD parts on one side (for manufacturability)
* Why not use a ground plane on both sides?
Thanks, still very new to PCB design (it is a hobby after all...so no formal training in electronics since I started about 2 years a go).

I figured that I will have to try out different capacitor values if I do get noise issues...and can always leave one off. It is a prototype so I just threw a load on in the vain attempt of "covering bases" if need be.

Yeah, may figure putting the reset switch and the few back SMD components on the top. Issue being that massive CR2032 battery holder...It'd make the boards damn near twice the size (so twice the cost I guess)...or do I just move the smaller components...or is there no point as the board would be "flipped" once anyway so yeah?

With a GND plane on both sides, doesn't that mean I'd have to route a VCC trace to all components through the top GND plane? Does that not potentially cause noise issues (having a 38KHz modulated signal for example) or during programming?

DrAzzy

I would leave the CR2032 holder on the bottom. Also, I would consider whether a through-hole one would be better (esp if doing other through-hole parts on the board); I'm not terribly impressed with the SMD coin cell holders.

Are you currently doing a Vcc plane on one side and Gnd on the other? I only see one copper pour?

I would not expect any sort of noise issue with that sort of configuration - it's very commonly used, and nothing you've described doing is particularly troublesome/demanding in that way.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Johnny010

#6
Sep 20, 2017, 12:03 am Last Edit: Sep 20, 2017, 12:12 am by Johnny010
Thank you. I have a VCC top plane and a GND bottom plane.


I have made a copy of my design and made a version with a Top and Bottom GND plane. Actually saved a lot of vias somehow.

DrAzzy

I've noticed the same thing w/two ground planes vs ground + vcc plane in regards to how hard/easy routing is. To be clear, gnd + vcc plane is totally valid design decision (it's in fact very common to have a power plane on boards with 4 or more layers - much less common with 2-layer boards) - I just didn't see that there were two pours.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up