Shop OBEX P1 Docs P2 Docs Learn Events
Bs2px — Parallax Forums

Bs2px

wafa86wafa86 Posts: 44
edited 2010-10-27 14:13 in BASIC Stamp
what does that means "BS2PX module is 75 MIPS Performance"?

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2010-10-05 10:58
    MIPS=million instructions per second.

    Just means the BS2px is the fastest Stamp. There is a comparison chart available through the main Parallax webpage.
  • wafa86wafa86 Posts: 44
    edited 2010-10-05 11:10
    okey now I get it. okey em what about this "1 instruction per clock for most instructions (skips require 2 clocks, branches require 3clocks, IREAD requires 4)".

    this is a feature in BS2PX microcontroller, and I want to know the word "skips" what they mean by it and which kind of instructions is it???? " is it goto and gosub"?????
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-05 11:44
    Stamp Basic programs get compiled into an interpretive code (byte codes) and some of the interpretive instructions are conditional skips and some of the interpretive instructions are branches. A skip instruction skips the following instruction if a particular condition is met. This is used to implement some IF statements and some other control statements and saves a little memory over a branch instruction since it doesn't need an address. A GOTO would be implemented as some kind of branch instruction. A GOSUB would have its own instruction since it has to save a return address.
  • wafa86wafa86 Posts: 44
    edited 2010-10-05 15:34
    okey thanks alot. you gave me very helpful info I appreciate that.:)
  • wafa86wafa86 Posts: 44
    edited 2010-10-06 07:07
    Is the SX48BD consedered RISC architecture???
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-06 09:01
    Here's an article on the subject of RISC.

    The SX architecture (here), as you can see in the article, violates several properties of a RISC architecture.

    The Propeller would be considered a RISC architecture.
  • wafa86wafa86 Posts: 44
    edited 2010-10-07 09:17
    In SX48BD, "Port A provides symmetrical source / sink capability" is it means that the 4-bit port A require an equal voltage or currunt for sink and source???
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-07 09:54
    Symmetrical source / sink capability refers to output. It means that the transistor between the I/O pin and Vss (sink) is the same size as the transistor between the I/O pin and Vdd (source) so that the amount of current that can be supplied by either transistor when turned on is approximately the same.
  • wafa86wafa86 Posts: 44
    edited 2010-10-11 09:28
    In SX48BD :" ports B,C,D and E Each port has four associated 8-bit registers (Direction, Data, TTL/CMOS Select, and Pull-Up Enable) to configure each port pin as Hi-Z input or output, to select TTL or CMOS voltage levels, and to enable/disable the weak pull-up resistor.
    I did not understand the blue highlighted text what do they means????:confused:
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-11 11:32
    Read this article on pull up resistors.

    Read the section in the Basic Stamp Syntax and Reference Manual on input/output and the chapters on the INPUT and OUTPUT / HIGH / LOW statements.

    This BS2px Brief discusses this in relation to the BS2px on page 5.
  • wafa86wafa86 Posts: 44
    edited 2010-10-17 10:17
    Port B also supports the Multi-Input Wakeup feature on all eight pins.

    what does this feature do?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-17 10:52
    Here's information on this feature.

    The BS2px as far as I know doesn't support this feature.
  • wafa86wafa86 Posts: 44
    edited 2010-10-17 11:45
    I read about multi-input wakeup feature in SX48BD microcontroller that exist in BS2PX module is that means that this feature is disable in this module?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-17 11:52
    It's not "disabled". The feature simply isn't used. The BS2px is an SX48 on a module that includes a voltage regulator, brownout detector, and a serial interface for programming. The SX48 is pre-programmed with a PBasic interpreter which is what is used for programming the BS2px. This interpreter doesn't use the multi-input wakeup feature and there's no way to change the interpreter to do so.
  • wafa86wafa86 Posts: 44
    edited 2010-10-18 10:37
    ahaaa okey. now I get it :idea:

    I have another Q:

    SX48BD has work register to do the following:

    It holds the second operand of an instruction, receives the literal in immediate type instructions, and also can be program selected as the destination register

    I did not understand the blue text, how is the work register work according to what written in the blue text???
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-18 10:50
    Maybe the use of "receive" is confusing. This is relatively formal English. The work register is sometimes called an "accumulator" (look up in a computer glossary). Both of these are old terms in computing.

    Anyway, arithmetic operations have 3 operands, 2 source values and a destination. For some operations (like subtraction or division), the source operands are not equivalent. Some instruction sets have one explicit operand (like the SX) with the other source and the destination operand being fixed (the work register). You might have "work register = work register - operand". Immediate instructions use the explicit source operand field (the address usually) as the actual operand. For move-type instructions, the work register "receives" the immediate operand value ("work register = operand").
  • wafa86wafa86 Posts: 44
    edited 2010-10-19 03:39
    ahaa okey. In 8086 microprocessor, it uses an accumulator registor called Ax, and this is one of the general purpose registers, also Ax is used for special instructions. Is the work registor in SX48 has similar job???
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-19 07:04
    What do you think? How are they used?
  • wafa86wafa86 Posts: 44
    edited 2010-10-19 15:08
    From your explanation, I understood that the work register works as distination or source or can be used in immediate addressing mode and Ax does the same job... unless if you mean how the Ax used, will I think it is similar to work register job according to what I realize from your explanation
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-19 21:00
    You've got the right general idea. The SX has a single specific work register or accumulator that functions as the destination register for most instructions and one of two source registers for many instructions. In the 8086, A (and sometimes AX) acts as the implicit destination and one source for many instructions.
  • TumblerTumbler Posts: 323
    edited 2010-10-20 08:27
    @Mike
    The work register is sometimes called an "accumulator" (look up in a computer glossary). Both of these are old terms in computing.
    Now i'm feeling old too! :)
  • wafa86wafa86 Posts: 44
    edited 2010-10-20 14:51
    thaaaaaaanks alot Pro. Green you helped me alots with your generous info.

    I have another question, the PC register is 12-bit which is the counter of the program memory. Program memory consists of several pages, since the last 3-bit in PC register determines separate pages in each variation in the last 3-bit, then the number of pages is 2^3 = 8. Also in the beginning of each page, the lower nine bits of the program counter are zeros and ones at the last address of a page, so I subtract the last address from start address at page 1 for example as follows:

    3FF – 200 = 1FF + 1 = 512 instructions ' for easier format I used binary representation

    since the total size of the program memory = 16,348 byte then page size = 16,348 / 8 = 2048 byte or 2KByte

    The question now, can you correct me if I was wrong????:smilewinkgrin:
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-20 15:46
    This is the sort of detailed specific question where you need to find the answer yourself. The information you need is in the SX Manuals. I don't normally use the SX and I'd have to read through the manual myself to find what you want.

    Look at section 2.6 in the Ubicom SX User's Manual.
  • wafa86wafa86 Posts: 44
    edited 2010-10-27 09:50
    hi...
    In the BS2PX module, the duration unit = 0.166 ms and the Units in
    Frequency = 6.03 Hz.

    these values mentioned in FREQOUT command, how can i calculate The Duration and Frequency arguments ???

    Are these equations true?

    Duration Argument = (Pulse Duration (ms)m)/(PULSOUT Duration units (μs))

    Frequency Argument = (Pulse Frequency (Hz))/(FREQOUT Frequency units (Hz))


    ?????????????

    :confused:
  • wafa86wafa86 Posts: 44
    edited 2010-10-27 12:55
    another Q?
    this is written in the text book of Boe-bot using BS2:

    Here is an example of a FOR…NEXT loop that will make the servo turn for a few seconds:

    FOR counter = 1 TO 100
    PULSOUT 13, 850
    PAUSE 20
    NEXT

    Let’s figure out the exact length of time this code would cause the servo to turn. Each time through the loop, the PULSOUT command lasts for 1.7 ms, the PAUSE command lasts for 20 ms, and it takes around 1.3 ms for the loop to execute.

    One time through the loop = 1.7 ms + 20 ms + 1.3 ms = 23.0 ms.

    how do we know the time of for..loop in single iteration??? here it is equal to 1.3ms, how did they get this number??? and this time(1.3ms) is for BS2, is it also for the rest modules specially BS2PX???
  • Mike GreenMike Green Posts: 23,101
    edited 2010-10-27 14:13
    I don't understand why you're asking some of these questions. Your question about FREQOUT is answered by the Stamp Manual. The equations you've given are just restatements of the description of the FREQOUT arguments.

    Regarding execution times ... Tracy Allen has done a lot of work on Stamp execution times. Read his tutorials here. The BS2px was produced after Tracy wrote his tutorials, so there is no information on the BS2px there. From the published information on it, it's the fastest of the Basic Stamps, but no one has done the detailed timings.

    Typically, you write a program that executes just a FOR / NEXT loop with a TOGGLE statement within it, then determine this loop's execution time for 10000 times and divide the execution time by 10000. You use an oscilloscope or logic analyzer to time things. You add another statement to the loop and determine its execution time and subtract the overhead (FOR / TOGGLE / NEXT) to get the execution time of the new statement. Repeat this general technique with the various statements and expression operators and you'll get a table of execution times for the various Basic operations.
Sign In or Register to comment.