comm from mega 328 to 32u2

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have existing hardware running on a atmega328 chip that I need to transfer it's data to a 32u2 via pins pd0 and pd2 of the mega328. Reason for this is that I'm hijacking the usb line I use with v-usb on the mega328.  I successfully wrote my own protocol  (a common clock / data paradigm) but I was wondering if there was a way to misuse(?) the usart or use another method. I can successfully transfer 16 bytes around 700us as it is now and need to be under 1ms. The mega328 runs a 12Mhz and the 32u2 is running a 16Mhz. I can use any pins on the 32u2 but I'm locked to the two pins on the mega328.

 

Thoughts? If not ill stick to what I have.

Last Edited: Fri. Dec 21, 2018 - 05:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why is your current solution not good enough?

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A bit bang sync serial (spi) should work just fine, a little slower then if you used the h/w spi but should work fine.

Is the data only going one direction?

 

Jim

 

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Data are both directions and the host decides priority.  I can't say that it does not work, it does but I have not tested large amounts of data yet. If something already exists I'd rather use it then to use something that has been recently invented. There is also an advantage if I can keep from using a proprietary standard or one that I would have to document.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Take a look at S.N.A.P:  http://www.hth.com/snap/

I have used this for point to point and point to multi-point comms.

 

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Very nice. Thx!