Greetings:
I have around 15 different systems running using MikroBasic Pro, custom application-specific interface hardware, and a Ready for PIC 40 pin as the "engine for the application. Working on program development for my first PIC32 application using a Clicker 2 for PIC32, custom application-specific interface hardware a DAC2 click and an ADC6 click. I have everything on the application-specific board running: 48 bits of multiplexed digital I/O, a keypad scanner, and a 4 X 20 LCD using your serial LCD adapter. Downloaded and installed the package manager, then did the same for the DAC2 click and the application for PIC32.
Can't get it to compile, as I get a great many undefined variables:
Code snippet (All microbus references throw a compiler error):
sub procedure systemInit()
mikrobus_gpioInit(_MIKROBUS1, _MIKROBUS_CS_PIN, _GPIO_OUTPUT)
mikrobus_gpioInit(_MIKROBUS1, _MIKROBUS_RST_PIN, _GPIO_OUTPUT)
mikrobus_spiInit(_MIKROBUS1, @_DAC2_SPI_CFG[0])
mikrobus_logInit(_MIKROBUS2, 9600)
Delay_100ms()
end sub
sub procedure applicationInit()
dac2_spiDriverInit(T_DAC2_P(@_MIKROBUS1_GPIO), T_DAC2_P(@_MIKROBUS1_SPI))
Delay_100ms()
dac2_clrDAC2Reg()
mikrobus_logWrite("Initialisation", _LOG_LINE)
mikrobus_logWrite("-------------------------------", _LOG_LINE)
end sub
sub procedure applicationTask()
dim
voltageOut as uint16_t
valuePct as uint8_t
strDisplayVoltage as char[10]
strValueOutPct as char[10]
Are these defined in the Mikrobus API? Where can I find what I need?
Help getting started here will be greatly appreciated.
Sincerely,
Terry Stefanski
Help with first Click application
- jovana.medakovic
- mikroElektronika team
- Posts: 986
- Joined: 18 Dec 2018 10:36
Re: Help with first Click application
Hello,
First, I apologize for the delayed answer.
When you open the project, press Alt+F9 to rebuild all sources.
After that, if you get some errors, please send me a screenshot.
Kind regards,
Jovana
First, I apologize for the delayed answer.
When you open the project, press Alt+F9 to rebuild all sources.
After that, if you get some errors, please send me a screenshot.
Kind regards,
Jovana
-
- Posts: 23
- Joined: 29 Jan 2016 21:13
Re: Help with first Click application
Sorry I have been so long away from this. I had a series of test boxes, that also used the Clicker 2 for PIC32MX that took priority. I needed fast 16bit analog I/O, so I did my own on the motherboard that the Clicker2 plugs into.
I am now back on my original project.
I started a new project with the ADC6 example.
Sucessfully installed the ADC_6 Click package for the PIC32MX
Successfully installed the mikrosdk_mirrobasic_pic32.mpkg
When I hit the alt-F9 combination, it errors out on the microbus_spiInit line.
I searched my entire hard drive and cannot find it.
Not sure where to go from here.
Thanks in advance for your help.
I am now back on my original project.
I started a new project with the ADC6 example.
Sucessfully installed the ADC_6 Click package for the PIC32MX
Successfully installed the mikrosdk_mirrobasic_pic32.mpkg
When I hit the alt-F9 combination, it errors out on the microbus_spiInit line.
I searched my entire hard drive and cannot find it.
Not sure where to go from here.
Thanks in advance for your help.
- Attachments
-
- ACD6 Error.pdf
- (194.73 KiB) Downloaded 95 times
- jovana.medakovic
- mikroElektronika team
- Posts: 986
- Joined: 18 Dec 2018 10:36
Re: Help with first Click application
Hello,
Please, check if you have enabled SPI in Project Level Defines in Project Manager -> ENABLE_SPI.
After that, press Alt+F9.
Kind regards,
Jovana
Please, check if you have enabled SPI in Project Level Defines in Project Manager -> ENABLE_SPI.
After that, press Alt+F9.
Kind regards,
Jovana
-
- Posts: 23
- Joined: 29 Jan 2016 21:13
Re: Help with first Click application
OK, it now got past the microbus_spiInit, but halts on the next line:
mikrobus_logInit(_LOG_USBUART_A, 9600)
I do not have an RS-232 port set up in this system, but I am already using a 4 X 20 character LCD with your SPI interface. I duplicated what comes out on port C of a READY 7 board on my custom motherboard (the Clicker 2 plugs in as a mezzanine board), defined the appropriate pins and it works well.
I will modify the code to use the LCD, and get back to you.
Thanks for your help.
Terry Stefanski
mikrobus_logInit(_LOG_USBUART_A, 9600)
I do not have an RS-232 port set up in this system, but I am already using a 4 X 20 character LCD with your SPI interface. I duplicated what comes out on port C of a READY 7 board on my custom motherboard (the Clicker 2 plugs in as a mezzanine board), defined the appropriate pins and it works well.
I will modify the code to use the LCD, and get back to you.
Thanks for your help.
Terry Stefanski