Could I get some advice on swapping a click-board to a different MikroBUS please?
In a project I'm thinking about, I'm planning on using two click-boards,ETH Click, and WiFi 9 Click.
Also, I am thinking of running both these boards from one MCU (PIC18F87K22), utilizing MikroBUS 1 and 2.
All on development board EasyPIC PRO v7
I have successfully downloaded from LibStock, then 'edited search paths' and 'rebuild all sources' on both boards example-code.
Both examples compile fine, but I don't have the hardware just yet to experiment with the actual boards and code myself on my easyPIC PRO v7.
Basic premise of my projects code is; If not physically plugged in with cable (Ethernet), Wifi takes over, all to make some pretty lights do some stuff. A user can change patterns or colours from a webserver (code held in MCU).
I see in the ETH Click code it probably uses MikroBUS-1.
From the example code where "_MIKROBUS1" is used;
Code: Select all
sub procedure applicationInit()
eth_spiDriverInit(T_ETH_P(@_MIKROBUS1_GPIO), T_ETH_P(@_MIKROBUS1_SPI))
Delay_ms(100)
SPI_Ethernet_Init(myMacAddr, myIpAddr, _ETH_FULLDUPLEX)
Delay_ms(100)
end sub
But in the WiFi 9 Click board example code, it also uses the same bus;
Code: Select all
sub procedure systemInit()
mikrobus_gpioInit(_MIKROBUS1, _MIKROBUS_AN_PIN, _GPIO_OUTPUT)
mikrobus_gpioInit(_MIKROBUS1, _MIKROBUS_PWM_PIN, _GPIO_INPUT)
mikrobus_gpioInit(_MIKROBUS1, _MIKROBUS_INT_PIN, _GPIO_INPUT)
mikrobus_gpioInit(_MIKROBUS1, _MIKROBUS_RST_PIN, _GPIO_OUTPUT)
mikrobus_gpioInit(_MIKROBUS1, _MIKROBUS_CS_PIN, _GPIO_OUTPUT)
mikrobus_uartInit(_MIKROBUS1, @_WIFI9_UART_CFG[0])
mikrobus_logInit(_MIKROBUS3, 115200)
mikrobus_logWrite("---- System Init ----", _LOG_LINE)
Delay_ms(100)
end sub
sub procedure applicationInit()
wifi9_configTimer()
wifi9_uartDriverInit(T_WIFI9_P(@_MIKROBUS1_GPIO), T_WIFI9_P(@_MIKROBUS1_UART))
My Question(s):
Can I use WiFi 9 Click in MikroBUS 2?
Is it as simple as changing all "_MIKROBUS1" references in the code (.mbas) to "_MIKROBUS2" and redoing 'Edit search paths' and 'Rebuild all sources' to compile?
Sorry for the long rambling post, hope to have given you where I'm at, lol
Any thoughts by author of WiFi 9 Click, Katarina Perendic, would be cool too!
Thanks!