Show Posts
Pages: 1 ... 5 6 [7] 8 9 ... 25
91  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: January 07, 2014, 02:47:13 pm
Cosa may now be used with both major versions of the Arduino IDE (1.05 and 1.5.5). The configuration files have been updated so that both environments are supported. The installation procedure for 1.5.5 will require an additional directory level to be created. Please see the installation instructions on github and/or the blog.

Thanks to @Jantje for convincing me that this update was a "piece-of-cake". 

http://forum.arduino.cc/index.php?topic=205961.msg1535917#msg1535917

Cheers!
92  Development / Other Software Development / Re: Using a arduino to reduce the number of pins needed for a LCD on: January 06, 2014, 07:19:09 pm
@Jantje

Thanks for the info. It helped convince me to look into adding support for 1.5.X. Actually it turned out to be not so complex or difficult. The changes for the Cosa core are (so far):

1. Install changed from Sketchbook/hardware/Cosa to Sketchbook/hardware/Cosa/avr. An extra directory needs to be created when installing.
2. Minor update to boards.txt to include the new 1.5.X attributes (e.g. upload.tool, bootload.tool, board). This can be improved to include the "Processor" menu item.
3. Copy the platform.txt file from the Arduino core and minor update to the board menu item attribute.

By leaving the 1.0.X attributes (e.g upload.using) in the boards.txt configuration works for both versions of the IDE.

I will push the update after some addition regression tests.  Cheers, and thanks again.
93  Development / Other Software Development / Re: Using a arduino to reduce the number of pins needed for a LCD on: January 06, 2014, 09:54:23 am
@Jantje

Thanks for the swift reply. Might need to take some time and prepare 1.5.X support. Sounds like it is more stable than I thought.

Cosa is not really an Arduino library. The installation method and structure is a core as the "platform" is self-contained and support a large number of boards and AVR processors within a single core.

I did a test run of 1.5.5 just to see where things went wrong. As you said the boards and platform files have changed both location and contents. There is a nice reuse between cores so I think the update should not be that difficult.

I would like to support both 1.0.X and 1.5.X but it seems like they will converge at some point, if I understand you correctly. This would be great and reduce variance handling.

Thanks again!
94  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: January 05, 2014, 08:05:45 pm
Just to show that I'm paying attention,
Thanks Rob. Corrected that. Just too many numbers ;-) Cheers!
95  Development / Other Software Development / Re: Using a arduino to reduce the number of pins needed for a LCD on: January 05, 2014, 03:29:40 pm
@kowalski
It comes to me that the Cosa library is not yet 1.5.x compatible.
I ask because I need 1.5.x as I want to run on a yun.
@Jantje

Need to ask you a question about 1.5.X. Do you think it is stable enough to start adding support for this? It isn't that much as I understand; new boards/platform file and build support. There is also a somewhat different directory structure with support for multiple architectures.

Also do you know if it is possible for a core to support both 1.0.5 and 1.5.X?

Cheers!
96  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: January 05, 2014, 02:14:42 pm
Cosa is approaching a first major release. It contains over 150 classes and over 30 SPI/TWI device drivers (35+ KLOC in total). Below is a complete list of classes (without internal implementation classes). These range from object-oriented Digital and Analog Pin abstractions to Wireless devices and application frameworks.  
Code:
BitSet.hh:class BitSet
Button.hh:class Button
Canvas.hh:class Canvas
Canvas.hh:  class Context
Canvas.hh:  class Element
Ciao.hh:class Ciao
Ciao.hh:  class Descriptor
EEPROM.hh:class EEPROM
EEPROM.hh:  class Device
Event.hh:class Event
Event.hh:  class Handler
ExternalInterrupt.hh:class ExternalInterrupt
Fai.hh:class Fai
Fai.hh:  class Descriptor
FixedPoint.hh:class FixedPoint
FSM.hh:class FSM
Interrupt.hh:class Interrupt
Interrupt.hh:  class Handler
IOBuffer.hh:class IOBuffer
IOStream.hh:class IOStream
IOStream.hh:  class Device
IOStream.hh:  class Filter
IR.hh:class IR
IR.hh:  class Receiver
Keypad.hh:class Keypad
Keypad.hh:class LCDKeypad
LCD.hh:class LCD
LCD.hh:  class Device
LED.hh:class LED
Linkage.hh:class Linkage
Linkage.hh:class Link
Linkage.hh:class Head
Listener.hh:class Listener
Menu.hh:class Menu
Menu.hh:  class Action
Menu.hh:  class Walker
Menu.hh:  class KeypadController
Menu.hh:  class RotaryController
OWI.hh:class OWI
OWI.hh:  class Driver
OWI.hh:  class Search
Periodic.hh:class Periodic
PinChangeInterrupt.hh:class PinChangeInterrupt
Pins.hh:class Pin
Pins.hh:class InputPin
Pins.hh:class OutputPin
Pins.hh:class PWMPin
Pins.hh:class IOPin
Pins.hh:class AnalogPin
Pins.hh:class AnalogPins
Pins.hh:class AnalogComparator
Power.hh:class Power
ProtocolBuffer.hh:class ProtocolBuffer
Queue.hh:class Queue
Registry.hh:class Registry
Registry.hh:  class Iterator
Registry.hh:  class Action
Rete.hh:class Rete
Rete.hh:  class Device
Rete.hh:  class Manager
Rotary.hh:class Rotary
Rotary.hh:  class Encoder
Rotary.hh:    class SignalPin
Rotary.hh:  class Dial
Rotary.hh:  class AcceleratedDial
RTC.hh:class RTC
Servo.hh:class Servo
SPI.hh:class SPI
SPI.hh:  class Driver
SPI.hh:  class Slave
Thread.hh:class Thread
Touch.hh:class Touch
Trace.hh:class Trace
TWI.hh:class TWI
TWI.hh:  class Driver
TWI.hh:  class Slave
Watchdog.hh:class Watchdog
Wireless.hh:class Wireless
Wireless.hh:  class Driver
AVR/Programmer.hh:class Programmer
AVR/STK500.hh:class STK500
Canvas/Font.hh:class Font
Canvas/GLCDFont.hh:class GLCDFont
Canvas/OffScreen.hh:class OffScreen
Canvas/UTFTFont.hh:class UTFTFont
Cipher/Base64.hh:class Base64
Cipher/RC4.hh:class RC4
Cipher/Vigenere.hh:class Vigenere
Driver/DHT.hh:class DHT
Driver/DHT.hh:class DHT11
Driver/DHT.hh:class DHT22
Driver/DS1302.hh:class DS1302
Driver/HCSR04.hh:class HCSR04
Driver/NEXA.hh:class NEXA
Driver/NEXA.hh:  class Receiver
Driver/NEXA.hh:  class Transmitter
FS/FAT16.hh:class FAT16
FS/FAT16.hh:  class File
Soft/SPI.hh:  class SPI
Soft/SPI.hh:    class Driver
Soft/UART.hh:  class UART
USI/TWI.hh:class TWI
USI/TWI.hh:  class Driver
USI/TWI.hh:  class Slave
Canvas/Driver/ST7735.hh:class ST7735
Canvas/Element/Textbox.hh:class Textbox
Canvas/Font/FixedNums8x16.hh:class FixedNums8x16
Canvas/Font/Segment32x50.hh:class Segment32x50
Canvas/Font/System5x7.hh:class System5x7
IOStream/Driver/CDC.hh:class CDC
IOStream/Driver/RS485.hh:class RS485
IOStream/Driver/UART.hh:class UART
IOStream/Driver/WIO.hh:class WIO
LCD/Driver/HD44780.hh:class HD44780
LCD/Driver/HD44780.hh:  class IO
LCD/Driver/HD44780.hh:  class Port4b
LCD/Driver/HD44780.hh:  class SR3W
LCD/Driver/HD44780.hh:  class SR3WSPI
LCD/Driver/HD44780.hh:  class SR4W
LCD/Driver/HD44780.hh:  class MJKDZ
LCD/Driver/HD44780.hh:  class GYIICLCD
LCD/Driver/HD44780.hh:  class DFRobot
LCD/Driver/HD44780.hh:  class ERM1602_5
LCD/Driver/PCD8544.hh:class PCD8544
LCD/Driver/ST7565.hh:class ST7565
LCD/Driver/VLCD.hh:class VLCD
LCD/Driver/VLCD.hh:  class Slave
OWI/Driver/DS18B20.hh:class DS18B20
OWI/Driver/DS18B20.hh:  class Search
SPI/Driver/SD.hh:class SD
TWI/Driver/ADXL345.hh:class ADXL345
TWI/Driver/AT24CXX.hh:class AT24CXX
TWI/Driver/AT24CXX.hh:class AT24C32
TWI/Driver/AT24CXX.hh:class AT24C64
TWI/Driver/AT24CXX.hh:class AT24C128
TWI/Driver/AT24CXX.hh:class AT24C256
TWI/Driver/AT24CXX.hh:class AT24C512
TWI/Driver/BMP085.hh:class BMP085
TWI/Driver/DS1307.hh:class DS1307
TWI/Driver/DS3231.hh:class DS3231
TWI/Driver/HMC5883L.hh:class HMC5883L
TWI/Driver/L3G4200D.hh:class L3G4200D
TWI/Driver/MPU6050.hh:class MPU6050
TWI/Driver/PCF8574.hh:class PCF8574
TWI/Driver/PCF8574.hh:class PCF8574A
TWI/Driver/PCF8591.hh:class PCF8591
Wireless/Driver/CC1101.hh:class CC1101
Wireless/Driver/NRF24L01P.hh:class NRF24L01P
Wireless/Driver/VWI.hh:class VWI
Wireless/Driver/VWI.hh:  class Codec
Wireless/Driver/VWI.hh:  class Receiver
Wireless/Driver/VWI.hh:  class Transmitter

Cosa is implemented as an Arduino 1.0.5 "core" and replaces the standard Arduino/Wiring core. All ATmega328P (Uno, Nano,...), ATmega2560 (Mega), ATmega1284 (Mighty) and ATmega32u4 (Leonardo, Micro,...) Arduino based boards are supported together with support for ATtinyX4, ATtinyX5, ATtinyX61 within this single core. The devices drivers and processor module abstractions are available across all processors (where the HW supports them). Cosa is one of the  most complete platforms for Arduino board programming.

Please see documentation on github and blog for more details.
1. https://github.com/mikaelpatel/Cosa
2. http://dl.dropboxusercontent.com/u/993383/Cosa/doc/html/index.html
3. http://cosa-arduino.blogspot.se/

Cheers!
97  Using Arduino / Microcontrollers / Re: SPI in ISR do not work on: January 05, 2014, 01:31:14 pm
This question has an interesting complexity as SPI is a bus that may be several units with different clock, phase and frequency. Also each unit has its own chip select and could have one or several interrupt pins.

Now your question need to be broken down into several parts to be able to answer it. First could SPI transfer be called from an ISR (any ISR)? It could but there are a number of restrictions. First no other SPI transfer should be in progress. No device should be selected (pre SPI transfer). Second could SPI transfer be used in SPI completion? This question is more "how is SPI completion ISR used". In this case SPI transfer would be a "DMA" style operation where the ISR fetches data from a buffer and put into the SPDR register without waiting for the flag to be set. Instead the processor continues and the ISR handles the transfer block as, for instance, in TWI and UART/Serial.

The Arduino implementation of SPI is very simple and does not really support multiple devices very well. To implement a more robust scheme much more logic is needed. If you are interested in how this can be done please see Cosa/SPI. https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/SPI.hh. There are also Linux SPI device drivers to be studied.

The Cosa implementation handles multiple devices with ISR and both ATmega and ATtiny USI implementation. It does not implement SPI completion interrupt handler as the SPI frequency is assumed to be greater than 1 MHz and there would not be time for anything else during a block transfer. More details on forum topic http://forum.arduino.cc/index.php?topic=150299.0

Cheers!
98  Using Arduino / Displays / Re: Cosa/Boosting LCD 1602 performance (7X SR4W, 6.5X 4-bit parallel, 1.7-2.3X I2C) on: January 03, 2014, 07:26:10 pm
A short update on the Cosa LCD support. The following devices and processes have been added.

1. TWI expander ports and display; GYIICLCD, ERM1602-5
2. ATtinyX4, ATtinyX5, ATtinyX61
3. ATmega1264 (Mighty)
4. ATmega32u4 (Arduino Leonardo, Micro, LilyPad USB, Pro Mini, etc)

Please see github for further details. https://github.com/mikaelpatel/Cosa/tree/master/cores/cosa/Cosa/LCD
and the blog http://cosa-arduino.blogspot.se/2013/07/object-oriented-lcd-management.html

Cheers!
99  Using Arduino / Displays / Re: 1.8" SPI TFT LCD ILI9163C on: January 03, 2014, 07:17:10 pm
Please see the blog; http://cosa-arduino.blogspot.se/2013/02/installing-cosa.html

Programs in Arduino are called sketches and stored in the Sketchbook directory. You should create a directory named hardware in the Sketchbook directory and unzip the Cosa zip file there. It is really simple. Do not attempt to move files around you will just get a lot of compile errors.

If you have problems please post me a message.

Cheers!
100  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 31, 2013, 11:27:49 am
@sirhax

Many, many THANKS back to you and all for testing and support this project. Without your effort testing different parts of Cosa it would not have evolved as much as it has. Your questions help improve documentation, abstractions and give a better understand for typical usage patterns - not to mention all the encouragements!

Great year with a lot of fun. Hope to be able to find as much time next year and continue the work on the blog, more demo code and documentation.

Cheers! And a Happy New Year.
101  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 29, 2013, 07:54:15 pm
And I could help you a bit - without obligations from your side - by solving your first problem in getting some modules if you want...
That would help ;-). The RFM69 was not (yet?) a very popular wireless module on ebay. Actually more or less a single US based seller.

Cheers!
102  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 29, 2013, 07:47:33 pm
Will support for the Arduino Leonardo be added anytime soon?
@M00dless
USB/CDC will be added later on.
Later became sooner than I first thought. An update is now available with basic USB support with CDC.

Cheers!

Interface CDC: https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/IOStream/Driver/CDC.hh
Example sketch CDC: https://github.com/mikaelpatel/Cosa/blob/master/examples/Sandbox/CosaCDC/CosaCDC.ino
103  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 28, 2013, 06:53:55 pm
Would you consider adding support to Cosa for the Hope RFM69W / RFM69HW trancievers as you did for the nRF24L01+ ?
@MarsWarrior

Yes, have been looking at a few other RF modules. The "problem" is more or less getting hold of a few modules and putting together a test environment. Also there is some extra "link level" code to be written to add the same level of support as the NRF24L01P (e.g. retransmission). I have to do this for the other devices anyway; VirtualWire (VWI) and CC1101. Both are "raw" send/receive right now. Also there is some work to be done to get a mesh with routing up and running on top of the Wireless interface.

Anyway I will have a look at the spec. So far it seems to be an interesting challenge with a lot in common with CC1101. And it has some extra features (encryption and crc support).

Cheers!
104  Development / Other Software Development / Re: Cosa: An Object-Oriented Platform for Arduino programming on: December 28, 2013, 05:37:59 pm
Will support for the Arduino Leonardo be added anytime soon?
@M00dless

Need to update my previous answer on this issue ;-). There is now support for ATmega32u4 boards (Micro, LilyPad USB and Leonardo) in Cosa. USB/CDC will be added later on. Upload is as normal but serial output goes over the UART. In some cases you will have to press the reset button on the board before the upload as the internal USB module is not active.

Cheers!

Ref. https://github.com/mikaelpatel/Cosa/commit/e638a30fa461b99be19f85811311948d5f9335fa
105  Development / Other Software Development / Re: Is there a way to determine the size of a function runtime? (solved?) on: December 26, 2013, 06:57:14 pm
If you are using Linux it is easy to script this using avr-nm. The command below will generate the info you are looking for.

avr-nm -CS /tmp/build*/*.elf

This will actually list all builds. The option C generates demangled symbols. The option S gives the function size.

Cheers!

BW: I use the below script (avr-list) to generate an assembly listing and symbols for verification.
Code:
avr-size -C /tmp/build*.tmp/$1.cpp.elf > $1.lst
avr-objdump -d /tmp/build*.tmp/$1.cpp.elf >> $1.lst
avr-nm -CS /tmp/build*.tmp/$1.cpp.elf > $1.sym
Below is a snippet of "CosaRS485master.sym" which was generated with the command "avr-list CosaRS485master". The example sketch is part of the Cosa library. The output contains function start address and size. Additional filtering may be used to create a file for further analysis.
Code:
/tmp/build2072171476263976679.tmp/CosaRS485master.cpp.elf:
00000210 t .do_clear_bss_loop
00000212 t .do_clear_bss_start
00000220 t .do_global_ctors_loop
00000228 t .do_global_ctors_start
000005ca 000000ac t global constructors keyed to free_memory()
00001630 00000128 t global constructors keyed to UART::uart
00002058 00000022 t global constructors keyed to Event::queue
00000c64 00000012 t global constructors keyed to IOStream::Filter::Filter(IOStream::Device*)
00001f7a 00000020 t global constructors keyed to Watchdog::s_handler
0000207a 000000c4 t global constructors keyed to trace_log_mask
00000394 00000026 W endl(IOStream&)
00002214 00000016 W init()
000006a0 000002a8 T loop()
0000090c 00000120 T setup()
00800347 00000008 V guard variable for uart
00800483 00000008 V guard variable for trace
0080034f 00000045 b ibuf
00800394 00000045 b obuf
008003d9 00000001 B RTC::s_initiated
00001d76 0000003a T RTC::begin(void (*)(void*), void*)
008003e6 00000002 B RTC::s_env
008003e0 00000004 B RTC::s_sec
00001db0 0000004a T RTC::micros()
000019de 00000016 W RTC::millis()
008003de 00000002 B RTC::s_ticks
008003da 00000004 B RTC::s_uticks
008003e4 00000002 B RTC::s_handler
00002236 00000058 T Head::on_event(unsigned char, unsigned int)
000011b6 00000020 T UART::on_rx_interrupt()
000011d6 00000022 T UART::on_tx_interrupt()
00001174 00000042 T UART::on_udre_interrupt()
000010e2 00000002 W UART::on_transmit_completed()
000003d4 0000001e W UART::room()
0080033f 00000008 B UART::uart
000010e4 00000090 T UART::begin(unsigned long, unsigned char)
00000446 0000001e W UART::flush()
00000428 0000001e W UART::getchar()
00001758 0000006e T UART::putchar(char)
00000410 00000018 W UART::peekchar(char)
000003f2 0000001e W UART::peekchar()
000003ba 0000001a W UART::available()
0080042e 00000052 B Event::queue
000010ca 00000018 T Power::sleep(unsigned char)
00000464 00000022 W RS485::on_transmit_completed()
000019f0 00000398 T RS485::recv(void*, unsigned int, unsigned long)
000017c4 0000021a T RS485::send(void const*, unsigned int, unsigned char)
000021c6 0000004e T Trace::begin(IOStream::Device*, char const*)
00002160 0000006a T Trace::fatal_P(char const*, int, char const*)
00000562 00000068 W IOBuffer<(unsigned char)64>::gets(char*, unsigned int)
0000049e 00000018 W IOBuffer<(unsigned char)64>::room()
00000676 0000002c W IOBuffer<(unsigned char)64>::flush()
0000053c 00000026 W IOBuffer<(unsigned char)64>::getchar()
000004b6 0000002e W IOBuffer<(unsigned char)64>::putchar(char)
00000508 00000034 W IOBuffer<(unsigned char)64>::peekchar(char)
000004e4 00000024 W IOBuffer<(unsigned char)64>::peekchar()
00000486 00000018 W IOBuffer<(unsigned char)64>::available()
00000a34 00000016 T IOStream::set_device(IOStream::Device*)
00000a4a 00000064 T IOStream::print_prefix(IOStream::Base)
00000e96 000000b8 T IOStream::print(int, IOStream::Base)
00000d2c 00000072 T IOStream::print(unsigned int, IOStream::Base)
00000e18 00000082 T IOStream::print(long, IOStream::Base)
00000d9a 00000082 T IOStream::print(unsigned long, IOStream::Base)
00000c76 00000090 T IOStream::Device::gets(char*, unsigned int)
00800333 00000003 B IOStream::Device::null
00000d04 00000028 T IOStream::Device::puts(char const*)
00000c10 0000004e T IOStream::Device::read(iovec_t*)
00000bbc 00000054 T IOStream::Device::read(void*, unsigned int)
00000ab4 00000006 T IOStream::Device::room()
00000c5e 00000006 T IOStream::Device::flush()
00000b5c 0000004e T IOStream::Device::write(iovec_t const*)
00000b08 00000054 T IOStream::Device::write(void const*, unsigned int)
00000ac0 00000048 T IOStream::Device::puts_P(char const*)
00000bb6 00000006 T IOStream::Device::getchar()
00000aba 00000006 T IOStream::Device::putchar(char)
00000bb0 00000006 T IOStream::Device::peekchar(char)
00000baa 00000006 T IOStream::Device::peekchar()
00000aae 00000006 T IOStream::Device::available()
0000213e 00000022 W IOStream::printf_P(char const*, ...)
00000f4a 00000188 T IOStream::vprintf_P(char const*, void*)
00000a24 00000010 T IOStream::IOStream()
00000370 00000024 W IOStream::operator<<(char const*)
0080042c 00000001 B Watchdog::s_prescale
00001f9a 000000c2 T Watchdog::await(bool (*)(void*), void*, unsigned int)
00001e8e 00000064 T Watchdog::begin(unsigned int, unsigned char, void (*)(void*), void*)
008003ea 00000002 B Watchdog::s_env
0080042d 00000001 B Watchdog::s_mode
00800428 00000004 B Watchdog::s_ticks
008003ec 0000003c B Watchdog::s_timeq
008003e8 00000002 B Watchdog::s_handler
Pages: 1 ... 5 6 [7] 8 9 ... 25