Pages: 1 2 [3]   Go Down
Author Topic: Pitolino - a small data logging gadget  (Read 3569 times)
0 Members and 1 Guest are viewing this topic.
Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2061
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-razz  smiley-razz
So currently I will stay with the numbering as is.. avr-developers (..maniac-bug uses clockwise PA numbering).
p.
Logged

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1597
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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 Offline
Edison Member
*
Karma: 60
Posts: 2061
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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??


* maniac standard.jpg (45.61 KB, 465x351 - viewed 21 times.)

* maniac avr-developers.jpg (44.96 KB, 496x347 - viewed 18 times.)
« Last Edit: August 04, 2012, 01:58:49 pm by pito » Logged

Peoples Republic of Cantabrigia
Offline Offline
God Member
*****
Karma: 6
Posts: 719
Arduino happiness
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Edison Member
*
Karma: 60
Posts: 2061
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Edison Member
*
Karma: 63
Posts: 1597
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks fat16lib.
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2061
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Added schematics v 0.2.
p.
Logged

Peoples Republic of Cantabrigia
Offline Offline
God Member
*****
Karma: 6
Posts: 719
Arduino happiness
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 512
Posts: 26219
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2061
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: 1 2 [3]   Go Up
Jump to: