Show Posts
Pages: 1 [2] 3 4
16  Using Arduino / Project Guidance / Re: ATtiny85, delay() and TIMER0_COMPA_vect on: January 19, 2014, 04:26:04 am
Does not change anything. I removed all sei()/cli().

Without setupisr(); I get something about 0,5 Hz at Pin 1 and nothing at Pin 0

Adding setupisr(); I get about 15 Hz at Pin 1 and about 30 Hz at Pin 0.

Disabling Timer1 gives the expected 30 Hz at Pin 0 and (of course) nothing on Pin 1.
17  Using Arduino / Project Guidance / ATtiny85, delay() and TIMER0_COMPA_vect on: January 18, 2014, 06:24:21 pm
Hi!

I use ATtiny from https://code.google.com/p/arduino-tiny/ (http://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0100-0018.zip) and try to implement a timer interrupt. This small test program shall blink on pin 1 with 0,5 Hz and do some higher frequent stuff on pin 0. Hardware is ATtiny85 at 8 MHz. Bootlooader burned.

It works really fine if I don't do the "setupisr();". Blinks like a charm. If I do it, all hell breaks lose on Pin 1 and 0.

Code:
/*
 "Burnbootloader" burned
 */

#include <avr/io.h>
#include <avr/interrupt.h>

const byte PinLEDgreen = 0;
const byte PinLEDblue = 1;

void setupisr() {
  cli();

  TCCR0A = 0;
  TCCR0B = 0;

  // set up Timer 0
  TCCR0B |= bit (CS00) | bit (CS02);    // Prescaler  1024
  TCCR0A |= bit (WGM01);                // Timer 0 in CTC mode
  OCR0A = 127;                          // CTC Compare value (count up to 128)
  TIMSK = (1<<OCIE0A);

  sei();
}

ISR(TIMER0_COMPA_vect)
{
  cli();
  digitalWrite(PinLEDgreen, ! digitalRead(PinLEDgreen));
  sei();
}

void setup()
{
  pinMode(PinLEDgreen, OUTPUT);
  pinMode(PinLEDblue, OUTPUT);

  setupisr();
}

void loop(){

  digitalWrite(PinLEDblue,HIGH);
  delay(1000);
  digitalWrite(PinLEDblue,LOW);
  delay(1000);
}

Anyone sees my error? Any hints? Any ideas?

(Goal is to get the OneWire lib running on ATtiny85 and have timer interrupts...)

Thanks!
18  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: January 09, 2014, 04:30:35 pm
Ok, my current list of things with 1.0.5.

-- no real simple way to structure a project [1]
-- no way to organize the sketchbook [2]
-- shitty auto format (last post is only the tip of the iceberg)
-- library limits

- old gcc
- chaotic device management [2]

1: long story. in short it should work like that: use tabs, have all the declarations (vars/functions etc.) of a logical group at one tab. no need to "forward" declare on "main" tab etc.

2: this results in the stupid design idea of growing menus that could bend multiple times around the monitor. Its so backward '80 style of GUI design... And it is used for everything and its mother, sketchbook, examples, boards, Menues grow and grow and grow...

For the sketchbook, which I find highly useful, I wish I had an option to make a top level project with sub levels. Like "Alarm Clock" is top and "v1", "v2", "v3" etc as sub projects.

If I see the serial monitor of 1.5.5 I will stay with 1.0.5 ER for sure.
19  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: January 09, 2014, 09:59:47 am
1.5.5 fixes the problem, so there is nothing to suggest. :-)

I assume that once the 1.5.x/2.0?-path has stabilized that your other enhancements and fixes will move into the final version, too.

Exposing the formatter interface to fiddle around with it might not be worth the work. The way 1.5.5 exposes the formatter interface is a good way to add individual changes. If it works (and 1.5.5 seems to work) and there is a way to fix the errors, so shall it be. There are other areas that could need work... and 1.5.5 still has the 5+ years old gcc.
20  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: January 09, 2014, 05:54:42 am
Another problem, I don't know whom to blame. I have this nicely layouted part of code.

Code:
const unsigned int sigs[7][3] = // namepart, signature, prgmode
// Attiny Sig
{
  { 13, 0x9007, 1 },    // L: 0x6A, H: 0xFF             8 pin
  { 24, 0x910B, 2 },    // L: 0x62, H: 0xDF, E: 0xFF   14 pin
  { 25, 0x9108, 2 },    // L: 0x62, H: 0xDF, E: 0xFF    8 pin
  { 44, 0x9207, 2 },    // L: 0x62, H: 0xDF, E: 0xFFF  14 pin
  { 45, 0x9206, 2 },    // L: 0x62, H: 0xDF, E: 0xFF    8 pin
  { 84, 0x930C, 2 },    // L: 0x62, H: 0xDF, E: 0xFFF  14 pin
  { 85, 0x930B, 2 }
};  

If I press Ctrl-T for autoformat it comes out really ugly. I could live with that (I would prefer less ugly, but ok...) BUT there are space added in front of the closing curly bracket.

There are other instances where things inside comments are changed. I think this is a no-no-no.

What I really miss in this situation is to allow me to fine tune the formatting to my personal demands.

(Created a issue on github, too)
21  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: December 02, 2013, 07:56:24 am
I came across it by looking around after some gcc improvements. Before that I didn't notice the age of it. Then I learned that there are some discussions about the toolchain, but honestly, I was to lazy to follow all the threads and extract any official words. I downloaded a nightly 1.5 build and it has an old winavr, too.

As far as I see, only the error message has changed (the IDE doesn't place the cursor at the approximate error position... f*ck C).

Some problems are on the libraries side. gcc dropped prog_* types, I found some usage scanning my libraries path. So those files won't compile any more. Mostly adafruit-stuff.

If it makes any sense in doing the work, it would be a nice addition to parse the error messages. And adding a note somewhere, how to manually update the toolchain.

I don't know.  smiley
22  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: November 28, 2013, 11:57:12 am
Just for information and our all enjoyment... :-)

I moved from WINAVR to "MHV AVR Tools - A WinAVR Replacement". Code size of a random project changed from 12720 bytes to 11926 bytes. And as far as I see, everything works as before only with a current gcc toolchain.

Move is easy:
1. download http://www.makehackvoid.com/sites/default/files/MHV_AVR_Tools_20131101.exe
2. install somewhere, remember the folder name
3. after install, copy this folder to your desktop and rename it to avr
4. uninstall "MHV AVR Tools - A WinAVR Replacement" (installed in step 2. open folder, run uninstall)
5. open your Arduino-IDE folder, go to hardware\tools
6. rename "avr" to "avr org"
7. move the folder from step 3 to this folder
8. delete avrdude.conf in folder avr\bin
9 copy avrdude.conf from avr org\etc to avr\etc
23  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: November 04, 2013, 04:12:19 pm
Sounds good to me and I can live with it. I now know the reason so I can avoid it.

My setup is a portable one, I have everything in one folder on the desktop. Idea was to have it on a network drive, but my NAS is too slow and compiling a pain. So I have my main repository on the NAS and "localize" it by syncing the folder.
24  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: November 04, 2013, 03:18:54 pm
libraries are in C:\Users\hole\Desktop\Arduino ERW 1.0.5\libraries

And bingo, you are right. In my cold shed I have a small monitor (1024x786) and remote I have as much as I want... and remote it does work.

Anything to fix that problem beside buying something bigger for my shed? :-)
25  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC on: November 04, 2013, 02:36:37 pm
Eried, I'm just resting from a hour long search without any findings... But from the beginning: from now to then ERW stopped  loading the IDE, "launch4j an error occurred". I'm not sure what I did wrong...

Debug log showed nothing, so I stated poking around. I found that after deleting the "arduino/libraries" folder ERW starts fine. Restoring the folder, error.

So I installed the original IDE, copied the libraries folder from ERW to ORG, tried, starts OK.

So I deleted the libraries folder and merged the folder items by item, everything fine until I merged the last folder.... But: it isn't the folder. If I remove any random folder ERW works. If I add back that random folder I get the error.

Could it be that there is a libraries limit?
26  International / Deutsch / Re: Serial ersetzen on: August 31, 2013, 06:33:07 am
Ja, das klappt,  danke!

Mir wäre es lieber, zu verstehen, warum ich der Variable Serial nicht ein anderes Objekt zuweisen kann. Das ist m. E. viel schöner und entspräche dem Gedanken von Objekten.
27  International / Deutsch / Re: Serial ersetzen on: August 30, 2013, 03:55:02 pm
Doch, genau das will ich.

Ziel ist es, alle Serial.print() im Code lassen zu können und die Ausgaben auf das Display umzulenken.

Dass das ST7735Serial  noch nichts macht liegt im Kern daran, dass ich top-down programmiere.
28  International / Deutsch / Re: Serial ersetzen on: August 30, 2013, 03:37:32 pm
Quote
Ich glaube er wollte die bestehende Serial Variable irgendwie überschreiben
Das glaube ich auch!
29  International / Deutsch / Serial ersetzen on: August 30, 2013, 02:37:55 pm
Ich will ein kleines Display mit ST7735-Controller als Debug-Ausgabe nutzen. Dazu dachte ich mir: einfach in die vorhandene Serial-Variable ein neues Objekt zu hängen. Hier der anskizziert Prototyp.

Leider gibt es bereits beim Übersetzen einen Fehler, "error: expected type-specifier before " und ich scheitere furios an meinen rostigen C++-Kenntnissen.

Code:
#include <SoftwareSerial.h>

class ST7735Serial : public SoftwareSerial // oder Stream?
{
private:
public:
        ST7735Serial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false);

void begin(uint16_t baud_count);
void end(void);

virtual int available(void);
virtual void accept(void);
virtual int peek(void);
virtual int read(void);
virtual void flush(void);
virtual size_t write(uint8_t);
using Print::write;
operator bool();
};

void ST7735Serial::flush()
{
}

int ST7735Serial::available()
{
  return 0;
}

int ST7735Serial::peek()
{
  return -1;
}

int ST7735Serial::read()
{
  return -1;
}

// ?? virtual void accept(void);
size_t ST7735Serial::write(uint8_t) {
}

void ST7735Serial() {
}


void setup()
{
  Serial = new ST7735Serial();   //<--- "error: expected type-specifier before "
 
 
}

void loop()
{
}

30  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.4 for Windows (installer, drivers, etc) +SRC on: April 02, 2013, 01:33:46 am
Great work, thank you very much.
Pages: 1 [2] 3 4