Skip to main content
nad
Associate III
Dec 27, 2010 1:08 PM UTC
Question

point number

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
    Dec 27, 2010 1:48 PM UTC
    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
    Dec 27, 2010 3:43 PM UTC
    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
    Dec 27, 2010 6:02 PM UTC
    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
    Dec 27, 2010 10:02 PM UTC
    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.