Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 31 of 31

Thread: Teensy 3 as AVR ISP programmer?

  1. #26
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    550
    Yeah, and if you want a better, non-screwedup bootloader, that has the ability to write flash (Only tested on the 2560) go here:
    https://github.com/xxxajk/Arduino-stk500v2-bootloader
    I still need to write the flash-write lib for it.

  2. #27
    Junior Member
    Join Date
    Oct 2018
    Posts
    10
    Oh cool, thanls. Might be handy.

    I am really after a bootloader that allows me to program a 328au over i2c, or serial at a push. I was looking at Rotwang's work which looks good but not got it working yet.

    I feel like optiboot can accept flash program over serial but again I'm still not sure how to do that. Maybe it is as simple as sending via serial rather than SPI? Some of this is certainly above my head I fear.

  3. #28
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    550
    Never used 328 much, too limited for what my clients need.
    Weakest MCU used by my clients is the mega2560.

  4. #29
    Junior Member
    Join Date
    Oct 2018
    Posts
    10
    Finally got to working on this and I'm being bombarded with compile errors due to OCR1A etc. now I understand that this is a timer register that doesn't exist in the Teensy 3.6.

    I have read this page https://www.pjrc.com/teensy/td_timin...rvalTimer.html but I'm still feeling like this is way over my head.

    Are people generally just swapping out the OCR1A timer stuff that is written for AVR and replacing it with myTimer? or is that a gross oversimplification? Will I need to basically rewrite timer realted code in most cases?

    I know this is a super general question but i'm not even sure where to start looking at the code so specifics are as I say way over my head.

  5. #30
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    550
    It's used to generate an 8MHz signal on pin 9. You can comment this stuff out if your board has a crystal.

  6. #31
    Junior Member
    Join Date
    Oct 2018
    Posts
    10
    I have done that but still getting a bunch of errors. I will try again though. Probably a PICNIC (problem in chair not in computer).

    In the meantime you may like to have a look at this repo that I am working on to allow teensy programming a 328 over serial.

    https://github.com/RussCoty/Optiboot_Over_UART

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •