Rapa Nui
Offline
Edison Member
Karma: 30
Posts: 1171
Pukao hats cleaning services
|
 |
« Reply #30 on: August 04, 2012, 04:11:50 am » |
Thanks, maybe I will follow the idea "it does not matter" with the numbering scheme, as I do not see any need to follow the ..duino shield numbering. Frankly - D31 tells me nothing, but PD7 means bit number 7 on port D  So currently I will stay with the numbering as is.. avr-developers (..maniac-bug uses clockwise PA numbering). p.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 30
Posts: 1098
Arduino rocks
|
 |
« Reply #31 on: August 04, 2012, 09:56:27 am » |
I don't think the labels on the board matter too much, Teensy is easy to use with port-bit labels.
Pin Numbers are a pain but they permeate Arduino software so you do need a mapping. It would be nice if you didn't add another variant.
Are you using the mapping with D31 = A7 = PA0 or the one with D31 = A7 = PA7?
It would be helpful if the variants for 1284P had names. You can't build fast I/O libraries using pins_arduino.h. You need to use some compile time trick so digital read and write compile to cbi/sbi instructions.
Paul Stoffregen defined the symbol CORE_TEENSY. This permits the Teensy to be distinguished from the Leonardo. This define allows add both Teensy and Leonardo to be added to libraries for fast digital I/O and software SPI.
Currently I use the Sanguino mapping for 644/1284 in my fast I/O libraries. It had PA0 = D31 but D31 was analog pin 0.
|
|
|
|
« Last Edit: August 04, 2012, 10:43:55 am by fat16lib »
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 6
Posts: 1398
Arduino rocks
|
 |
« Reply #32 on: August 04, 2012, 01:09:11 pm » |
Currently I use the Sanguino mapping for 644/1284 in my fast I/O libraries. Where are these fast i/o libraries for Sanguino?
|
|
|
|
|
Logged
|
|
|
|
|
Rapa Nui
Offline
Edison Member
Karma: 30
Posts: 1171
Pukao hats cleaning services
|
 |
« Reply #33 on: August 04, 2012, 01:44:15 pm » |
@fat16lib: a good point. I used sanguino pin def in past. Now I am migrating to 1.0.1. I am using mega32 and 1284p. I downloaded maniac-bug hw variants, and created a variant based on his avr-developer variant for my atmega32. I did not elaborate 1284p with 1.0.1. Running mylogger on atmega32 under 1.0.1 (includes lcd4x20, sdfat, bmp085, i2c, rtc8563, servo, time) I do not have any issue yet. So for pitolino I see 2 variants applicable (see attached):
maniacbug-mighty-1284p/ standard ------------------------------------------------- static const uint8_t A0 = 24; static const uint8_t A1 = 25; static const uint8_t A2 = 26; static const uint8_t A3 = 27; static const uint8_t A4 = 28; static const uint8_t A5 = 29; static const uint8_t A6 = 30; static const uint8_t A7 = 31;
_BV(0), /* 24, port A */ _BV(1), _BV(2), _BV(3), _BV(4), _BV(5), _BV(6), _BV(7) };
maniacbug-mighty-1284p/ avr-developers --------------------------------------------------- static const uint8_t A0 = 24; static const uint8_t A1 = 25; static const uint8_t A2 = 26; static const uint8_t A3 = 27; static const uint8_t A4 = 28; static const uint8_t A5 = 29; static const uint8_t A6 = 30; static const uint8_t A7 = 31;
_BV(7), /* 24, port A */ _BV(6), _BV(5), _BV(4), _BV(3), _BV(2), _BV(1), _BV(0) };
Not sure the definitions are correct (see the below pictures) Now which one is better??
|
|
|
|
« Last Edit: August 04, 2012, 01:58:49 pm by pito »
|
Logged
|
|
|
|
|
Peoples Republic of Cantabrigia
Offline
God Member
Karma: 6
Posts: 640
Arduino happiness
|
 |
« Reply #34 on: August 04, 2012, 02:02:43 pm » |
Pito, FWIW, your order of pins as written is the same even though the schematic suggests the opposite (i.e. A0 = A7)
|
|
|
|
|
Logged
|
|
|
|
|
Rapa Nui
Offline
Edison Member
Karma: 30
Posts: 1171
Pukao hats cleaning services
|
 |
« Reply #35 on: August 04, 2012, 02:23:58 pm » |
Which schematics? There are three of them: mine on the PCB (A0=D31), standard (A7=D31) and avr-developers Sanguino (A0=D31).. The order of pins in avr-developers maps mines, but the definitions (ie static const uint8_t A0 = 24;) does not, therefore I think there is an issue with those defs..
|
|
|
|
« Last Edit: August 05, 2012, 02:35:30 am by pito »
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 30
Posts: 1098
Arduino rocks
|
 |
« Reply #36 on: August 04, 2012, 02:56:50 pm » |
florinc, I just posted a new version of the fast I/O libraries as DigitalPinBeta20120804.zip http://code.google.com/p/beta-lib/downloads/list. Standard 168/328, Mega, Teensy, Leonardo, Teensy++, and Sanguino are supported.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 6
Posts: 1398
Arduino rocks
|
 |
« Reply #37 on: August 04, 2012, 03:52:09 pm » |
Thanks fat16lib.
|
|
|
|
|
Logged
|
|
|
|
|
Rapa Nui
Offline
Edison Member
Karma: 30
Posts: 1171
Pukao hats cleaning services
|
 |
« Reply #38 on: August 05, 2012, 04:16:00 am » |
Added schematics v 0.2. p.
|
|
|
|
|
Logged
|
|
|
|
|
Peoples Republic of Cantabrigia
Offline
God Member
Karma: 6
Posts: 640
Arduino happiness
|
 |
« Reply #39 on: August 05, 2012, 05:59:38 am » |
Which schematics? There are three of them: mine on the PCB (A0=D31), standard (A7=D31) and avr-developers Sanguino (A0=D31).. The order of pins in avr-developers maps mines, but the definitions (ie static const uint8_t A0 = 24;) does not, therefore I think there is an issue with those defs..
Sorry about that,misread the data you posted.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 269
Posts: 17031
Available for Design & Build services
|
 |
« Reply #40 on: August 05, 2012, 10:34:48 am » |
Why not bring the RTCs ClockOut (pin 7, labeled as Vback on the sysmbol) to a 1284 pin also? Can use it as 1 Hz interrupt source (or 32 Hz, 1 KHz, 32 KHz).
|
|
|
|
|
Logged
|
|
|
|
|
Rapa Nui
Offline
Edison Member
Karma: 30
Posts: 1171
Pukao hats cleaning services
|
 |
« Reply #41 on: August 06, 2012, 04:28:54 pm » |
RTCs pin7 CLKOUT - open collector (or hiZ when disabled) - frequencies of 32.768 kHz (default), 1.024 kHz, 32 Hz, and 1 Hz. Yes, that could be possible - I would suggest connect it to PC4 (via 220ohm jumper resistor and 33k pull-up). UPD sch v0.3
|
|
|
|
« Last Edit: August 06, 2012, 04:39:10 pm by pito »
|
Logged
|
|
|
|
|
|