Go Down

Topic: Pitolino - a small data logging gadget (Read 4628 times) previous topic - next topic

pito

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

fat16lib

#31
Aug 04, 2012, 04:56 pm Last Edit: Aug 04, 2012, 05:43 pm by fat16lib Reason: 1
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.

florinc

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?

pito

#33
Aug 04, 2012, 08:44 pm Last Edit: Aug 04, 2012, 08:58 pm by pito Reason: 1
@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??

Constantin

Pito, FWIW, your order of pins as written is the same even though the schematic suggests the opposite (i.e. A0 = A7)

pito

#35
Aug 04, 2012, 09:23 pm Last Edit: Aug 05, 2012, 09:35 am by pito Reason: 1
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..

fat16lib

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.

florinc


pito


Constantin


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.

CrossRoads

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).
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.

pito

#41
Aug 06, 2012, 11:28 pm Last Edit: Aug 06, 2012, 11:39 pm by pito Reason: 1
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

Go Up