GPIO_Digital_Output

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
ART_ME
Posts: 22
Joined: 19 Dec 2016 09:48

GPIO_Digital_Output

#1 Post by ART_ME » 19 Dec 2016 09:50

Hello.
Need advice for a beginner.
In the examples MikroBasic have UART, which is an expression of GPIO_Digital_Output (@GPIOD_BASE, _GPIO_PINMASK_ALL) 'digitalni output
GPIOD_ODR = 0
Where can I find the rules for this expression, if it is in the same example in C is not?

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: GPIO_Digital_Output

#2 Post by lana.arsic » 20 Dec 2016 18:26

Hi ART_ME,

Welcome to the MikroE forum.
You can take a look in GPIO_Librray in the Help menu in the compiler.

You can use similar in mikroC for ARM:

Code: Select all

GPIO_Digital_Output (&GPIOD_BASE, _GPIO_PINMASK_ALL);  //digital output
GPIOD_ODR = 0;
Also, each example in mikroBasic is available in mikroC too, you can find appropriate examples
in installation folder, but also when you click on Open Examples Folder... icon in the compiler.

Best regards,
Lana

ART_ME
Posts: 22
Joined: 19 Dec 2016 09:48

Re: GPIO_Digital_Output

#3 Post by ART_ME » 20 Dec 2016 19:41

lana.arsic wrote:Hi ART_ME,
You can take a look in in the Help menu in the compiler.
Dear Lana,

My mistake was that I was looking for GPIO library in Library Manager, where it does not exist.

Thanks

ART_ME
Posts: 22
Joined: 19 Dec 2016 09:48

Re: GPIO_Digital_Output

#4 Post by ART_ME » 21 Dec 2016 06:38

And again the question of the beginner.

There are instructions:

sub procedure GPIO_Clk_Enable (dim port as ^ longword)

and it is an example of the expression:

GPIO_Clk_Enable (@GPIO_PORTB)

What is "@", and where it came from?
"GPIO_PORTB" - is a variable or it is described in some rules?

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: GPIO_Digital_Output

#5 Post by lana.arsic » 21 Dec 2016 18:06

Hi,

Please take a look at the image in attachment (which is taken from the Help menu),
for detailed explanation what is the use of operator @.

GPIO_PORTB is GPIO PORTB register, you can find definitions of appropriate MCU
when you open Defs file (Ctrl + Alt + D), but for information like detail explanation of MCU registers
you need to search the MCUs datasheet which you are using.

Best regards,
Lana
Attachments
At_operator.png
At_operator.png (28.08 KiB) Viewed 5989 times

ART_ME
Posts: 22
Joined: 19 Dec 2016 09:48

Re: GPIO_Digital_Output

#6 Post by ART_ME » 21 Dec 2016 18:46

Hi lana.arsic,

Pointer is not basic. Pointer is C. Therefore, I could not guess what this character should look at the statements.

Then I see if GPIO_PORTB is dim, then I have to use pointer.

Thanks.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: GPIO_Digital_Output

#7 Post by filip » 22 Dec 2016 17:27

Hi,

The mikroBasic compiler supports pointer type, it may be derived from other languages, but it is widely used in our codes.
If you have any problems or questions, we will gladly help.

Regards,
Filip.

ART_ME
Posts: 22
Joined: 19 Dec 2016 09:48

Re: GPIO_Digital_Output

#8 Post by ART_ME » 23 Dec 2016 07:01

Thank you, filip.
Earlier on your site had a separate section on libraries. And now I can not find it, there is only HELP in the compiler.
Is it possible to return this section of the site, and even better to link to pdf for ftp?
Use the description lib directly in the compiler is not always comfortable.

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: GPIO_Digital_Output

#9 Post by lana.arsic » 23 Dec 2016 17:51

Hi,

Thank you for your suggestion, I have forwarded it to our developers.

Meanwhile, here is a link with libraries:

https://download.mikroe.com/documents/c ... raries.htm

You can open Help file separately, from installation folder,
but just in case I'm sending it in attachment.

Best regards,
Lana
Attachments
mikroBasic_PRO_ARM.zip
(4.66 MiB) Downloaded 205 times

ART_ME
Posts: 22
Joined: 19 Dec 2016 09:48

Re: GPIO_Digital_Output

#10 Post by ART_ME » 23 Dec 2016 17:56

Lana, thank you very much for your wonderful response.

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: GPIO_Digital_Output

#11 Post by lana.arsic » 26 Dec 2016 16:53

Hi,

You're welcome, I'm glad it was helpful.

If you have more questions, feel free to ask.

Best regards,
Lana

Post Reply

Return to “mikroBasic PRO for ARM General”