To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3215
3214  |  3216
Subject: 
strange motor behaviour
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 1 Apr 2003 20:19:54 GMT
Viewed: 
2767 times
  
Hello,
I wonder if somebody can help me wíth the following problem.
In general my program is running okay but when I change the
attached data definition, the two motors I use show very strange
behaviour (just making some noise and moving very slow in random
directions).

with:
...
typedef char tilesTyp[10][20];
tilesTyp *tiles;
...
tiles=(tilesTyp *)malloc(sizeof(tilesTyp));
...
everything is fine
---
when I increase the size to for example:
...
typedef char tilesTyp[40][40];
...
the problem occurs.
Is there any size restriction when I allocate a dynamic block of memory?



Message has 2 Replies:
  Re: strange motor behaviour
 
(...) well, the RCX only has 32Kbyte of memory of wich half is used by brickOs the remaining half should fit you user programm and all runtime stacks and heaps, so allocating 40*40*2Bytes(the minimum for a pointer in an 32Kbyte adresspace) will need (...) (22 years ago, 2-Apr-03, to lugnet.robotics.rcx.legos)
  Re: strange motor behaviour
 
(...) The problem is that the upper memory area (0xf000-0xf800) is connected to both RAM and motor output. Every byte written here is also interpreted as motor command. The latest CVS version of BrickOS has fixed this (this memory is written only (...) (22 years ago, 2-Apr-03, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR