Skip to main content
nad
Associate III
December 27, 2010
Question

point number

  • December 27, 2010
  • 4 replies
  • 1190 views
Posted on December 27, 2010 at 14:08

hello, 

I have a problem with the point number. 

for exemple:

0.9383

    

0.7445

    

0.6478

    

0.5906. 

How to leave his number in the GPIO.

    This topic has been closed for replies.

    4 replies

    Andrew Neil
    Super User
    December 27, 2010
    Posted on December 27, 2010 at 14:48

    ''I have a problem with the point number''

    I think you mean, floating-point number?

    ''How to leave his number in the GPIO''

    Sorry, I don't understand what you mean by that - please explain?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    nad
    nadAuthor
    Associate III
    December 27, 2010
    Posted on December 27, 2010 at 16:43

    I'll make the connection between the STM8 and another device with controllable 

    point number between 0 and 1. 

    I'll save a matrix that contains these numbers and each event 

    will have one number that will come out. 

    For example: 

    if (condition1) 

    { 

    GPIOx = 0.2654; 

    } 

    Sorry ,

    I'm not good in English

     

    Andrew Neil
    Super User
    December 27, 2010
    Posted on December 27, 2010 at 19:02

    GPIOx represents a single 8-bit port - how do you plan to represent your ''point number'' on a single 8-bit port?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    nad
    nadAuthor
    Associate III
    December 27, 2010
    Posted on December 27, 2010 at 23:02

    forgiveness 

    I mean is that it 's one way to represent a floating point number with STM8S.