Go Down

Topic: Using Arduino Uno instead of FTDI cable to program 1284p w/ Optiboot (Read 17453 times) previous topic - next topic

ghps



The interrupt problem is even worse: No matter which interrupt I use, attachInterrupt defaults always to INT0 on pin 16/D10 - which is now used for RX1 on UART1. So in fact one only of the three interrupt lines is usable.


This assertion is backed up by what code?


Sorry false alert: The interrupts work as they should.

And one should never mix development environments: After one hour of testing I've found that using the sketches from Eclipse directly in the Arduino IDE caused avrdude to upload the same sketch again and again...

ghps

Final Remark: The easiest way to regain INT0 and INT1 is to solve the original problem.
This is caused only by RX0, in my tests of the serial port TX0 worked fine.
For a speed of 115.200 baud a simple RC group can filter the incoming signal up to a point where
RX0 is perfectly usable again. The RC filter consists of a 10k resistor in series and
100pf cap to ground.

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=107115

That's it, problem solved.

So I switched back from optiboot_atmega1284p-u1.hex to optiboot_atmega1284p-u0.hex...

retrolefty

I thought the problem that some people were having using uart0 on 1284P boards was pretty much solved with changing the low fuse byte to use full swing oscillator option?

Quote

#bobuino.bootloader.low_fuses=0xff
bobuino.bootloader.low_fuses=0xf7


I didn't require that change as I never saw a problem using optiboot on my CrossRoads through hole 1284P PCB using uart0 even with uploading long sketches, but I made the change anyway.

Lefty

oric_dan

lefty, as I remember in most of the prior discussions, you were using the 644 chip.
So, I assume you eventually got and tried the 1284P chips, and all is working
well with those?

retrolefty


lefty, as I remember in most of the prior discussions, you were using the 644 chip.
So, I assume you eventually got and tried the 1284P chips, and all is working
well with those?


That is correct, both the 644P and 1284P chips are working fine using CrossRoads through hole 1284 board and both chips loaded with optiboot and using the maniac's hardware files. As I said I never saw a serial problem with either chip but was following the thread where several were and they tried various fixes including a R/C filter on uart0 rec pin, but I though all found that changing the low fuse byte cleared up any uart0 problems?

Lefty

CrossRoads

#35
Mar 25, 2013, 05:39 pm Last Edit: Mar 25, 2013, 05:42 pm by CrossRoads Reason: 1
This board.
Schematics & PL at http://www.crossroadsfencing.com/BobuinoRev17/
Bare boards $6 mailed to US locations.
Will acceot all these 40-pin DIP chips:
ATmega164A
ATmega164PA
ATmega324A
ATmega324PA
ATmega644A
ATmega644PA
ATmega1284
ATmega1284P
offboard FTDI module, or onboard MIKROE-483 module
http://www.mouser.com/ProductDetail/mikroElektronika/MIKROE-483/?qs=%2fha2pyFaduhQ%2frcyPs7PmGdeFG1B7qIuGl16liNH8Zb3mCcKALPhoQ%3d%3d (less expensive than offboard modules - i think Mouser also has the best prices on uCs)
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.

tack

Changing the fuse to 0xf7 for Full Swing Oscillator solved the UART0 issue for most, me included.

The symptoms were being unable to upload anything other than small sketches via bootloader through UART0. The falure message was the pagef_write error. Uploading via ICSP worked fine. After changing the low fuse a full 128kb sketch can be uploaded vis UART0 without issue.

ghps


Changing the fuse to 0xf7 for Full Swing Oscillator solved the UART0 issue for most, me included.


I substituted a resistor and a capacitor for a single bit in the low fuses - and it works.

So I'll try again:

Final Remark 2.0: Set the low fuses to 0xF7 (not 0xFF) to enable the Full Swing Oscillator.

kf2qd

Since you already have an Arduino, - why don't you just learn how to use AVRDude and write the .hex file using ArduinoISP? In the end it will require about the same amount of messing around with the 2 devices, and use slightly less flash(I know, the 1284 has a bunch...) In some ways it might be slightly less convenient, but I have had enough problems with programming breadboarded  chips with a serial connection that using the ISP route was just easier.

Go Up