Bits and Port problem

General discussion on mikroBasic PRO for AVR.
Post Reply
Author
Message
MaKu
Posts: 1
Joined: 05 Nov 2010 18:41
Location: Germany - Hamburg

Bits and Port problem

#1 Post by MaKu » 05 Nov 2010 19:25

Hi,

i have a problem with some lines of code.
If i want to store a input e.g. pinb2 in an array, the compiler finished only with error 102.

some code snip:

Code: Select all

    SS = An        'is low
    SCK = An       'is low

    for Bitload = 31 to 0 step -1
        SCK = aus   'is high
        Delay_ms(2)
        InBits_Miso[bitload] = MISO 'get high or low from pin B2
        Delay_ms(2)
        SCK = An   ' is low
    next Bitload
explaining:
InBits_Miso is a Bit-Array of 32 elements
MISO is a input-pin of the ATmega32

see the picture for more code snip

someone an idea or i have overlooked something ?
Attachments
more code snip
more code snip
Bits_Failed.jpg (107.48 KiB) Viewed 1506 times

User avatar
slavisa.zlatanovic
mikroElektronika team
Posts: 1321
Joined: 07 Apr 2009 09:39

Re: Bits and Port problem

#2 Post by slavisa.zlatanovic » 08 Nov 2010 10:59

Hi!

Please, send me your project (to my personal email: slavisa.zlatanovic@mikroe.com).
I will inspect it and try to reproduce the issue you're talking about.
Thanks!

Best regards
Slavisa

Post Reply

Return to “mikroBasic PRO for AVR General”