Dj Marco BH Posted October 5, 2017 Report Share Posted October 5, 2017 (edited) Hi, How to transform J16 in a normally connected to the SRIO chain to scan DIN/DOUT modules? What should I change to achieve this goal? TKS!!! Marco. Edited October 5, 2017 by Dj Marco BH Quote Link to comment Share on other sites More sharing options...
TK. Posted October 6, 2017 Report Share Posted October 6, 2017 Hi, you can switch to J16 with following define in your mios32_config.h file: #define MIOS32_SRIO_SPI 0 Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Dj Marco BH Posted October 6, 2017 Author Report Share Posted October 6, 2017 Hi TK thanks for the reply !! Can I use SPI0 (DIN / DOUT) and SPI1 (DIN / DOUT) simultaneously? Quote Link to comment Share on other sites More sharing options...
TK. Posted October 6, 2017 Report Share Posted October 6, 2017 Unfortunately not - the SRIO driver is monolithic, it can only be assigned to a single SPI interface. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Dj Marco BH Posted October 6, 2017 Author Report Share Posted October 6, 2017 Tks TK. I got sad :( I used this function" MIOS32_SPI_TransferByte " ...and I got some signal from the LEDs ... MIOS32_SPI_Init(0); MIOS32_SPI_TransferModeInit(0,MIOS32_SPI_MODE_CLK1_PHASE1,MIOS32_SPI_PRESCALER_128); MIOS32_SPI_IO_Init(0,MIOS32_SPI_PIN_DRIVER_WEAK_OD); MIOS32_SPI_RC_PinSet(0,1,1); Quote Link to comment Share on other sites More sharing options...
TK. Posted October 6, 2017 Report Share Posted October 6, 2017 Of course, you are free to service the SR register chain directly without using the SRIO driver (resp. implement a second SRIO driver) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Dj Marco BH Posted October 7, 2017 Author Report Share Posted October 7, 2017 Hi TK, do you have any examples in the forum that control SRs (j16) as the "MIOS32_DOUT_PinSet" function? I tried to study this function, but I could not succeed. Thanks!! Quote Link to comment Share on other sites More sharing options...
TK. Posted October 8, 2017 Report Share Posted October 8, 2017 AFAIK there is no forum posting about this so far. The shift registers are service from MIOS32_SRIO, this code has to be duplicated (and button related functions have to be removed): http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmios32%2Fcommon%2Fmios32_srio.c Btw.: why do you need the second SRIO chain? Wouldn't it be easier to enhance the first chain by +16 SRs? Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Dj Marco BH Posted October 8, 2017 Author Report Share Posted October 8, 2017 Hi, I need it because of the DJ program (Traktor). each side of the deck has 16 RGB LEDs (96 outputs). Missing VUs, elapsed time, LEDs for the other buttons (RGBs). Unfortunately that consumes many outputs and I'm afraid the 256 outputs will not be enough. I just want to ensure having more options for digital inputs and outputs. I'll try it later, I program all day and my head can not think anymore. Sorry for my bad english. Thanks again !! Marco. Quote Link to comment Share on other sites More sharing options...
TK. Posted October 9, 2017 Report Share Posted October 9, 2017 Hi, you should consider to connect the RGB LEDs to a LED matrix, this is less expensive and also reduces the number of wires. E.g. a 8x16x3 matrix consist of 7 x 74HC595 and allows you to connect 128 RGB LEDs. Then just add another 8x16x3 matrix for the second deck. Do you know the MIDIbox NG application? It supports such features out-of-the-box: http://www.ucapps.de/midibox_ng.html Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Dj Marco BH Posted October 10, 2017 Author Report Share Posted October 10, 2017 Hi Thorsten . I did not want to use matrix, but I think I have to use. Can I configure the outputs of the 8x16 matrix using which function? BLM_CHEAPO? Thanks!! Marco Quote Link to comment Share on other sites More sharing options...
Dj Marco BH Posted October 10, 2017 Author Report Share Posted October 10, 2017 Hi Thorsten, I tried using MAKE to compile MIDIBOX_NG and some errors appeared. I:\MIOS32\trunk\apps\controllers\midibox_ng_v1>make rm -f project.hex Creating object file for port.c i:/MIOS32/trunk/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c: In function 'prvPortStartFirstTask': i:/MIOS32/trunk/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c:282:1: warning: stack usage computation not supported for this target [enabled by default] Creating object file for core_cm3.c i:/MIOS32/trunk/drivers/LPC17xx/CMSIS/src/core_cm3.c: In function '__get_PSP': i:/MIOS32/trunk/drivers/LPC17xx/CMSIS/src/core_cm3.c:451:1: warning: stack usage computation not supported for this target [enabled by default] Creating object file for usbcontrol.c i:/MIOS32/trunk/drivers/LPC17xx/usbstack/src/usbcontrol.c: In function 'StallControlPipe': i:/MIOS32/trunk/drivers/LPC17xx/usbstack/src/usbcontrol.c:127:6: warning: variable 'pb' set but not used [-Wunused-but-set-variable] Creating object file for psock.c i:/MIOS32/trunk/modules/uip/uip/psock.c: In function 'psock_send': i:/MIOS32/trunk/modules/uip/uip/psock.c:179:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable] i:/MIOS32/trunk/modules/uip/uip/psock.c: In function 'psock_generator_send': i:/MIOS32/trunk/modules/uip/uip/psock.c:218:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable] i:/MIOS32/trunk/modules/uip/uip/psock.c: In function 'psock_readto': i:/MIOS32/trunk/modules/uip/uip/psock.c:274:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable] i:/MIOS32/trunk/modules/uip/uip/psock.c: In function 'psock_readbuf': i:/MIOS32/trunk/modules/uip/uip/psock.c:301:3: warning: variable 'PT_YIELD_FLAG' set but not used [-Wunused-but-set-variable] Creating object file for ws2812.c i:/MIOS32/trunk/modules/ws2812/ws2812.c:71:2: warning: #warning "WS2812 driver not supported for this derivative yet!" [-Wcpp] i:/MIOS32/trunk/modules/ws2812/ws2812.c:102:12: warning: 'send_buffer' defined but not used [-Wunused-variable] Creating object file for msc_bot.c i:/MIOS32/trunk/modules/msd/LPC17xx/msc_bot.c: In function 'MSCBotBulkOut': i:/MIOS32/trunk/modules/msd/LPC17xx/msc_bot.c:268:13: warning: variable 'iChunk' set but not used [-Wunused-but-set-variable] Creating object file for msc_scsi.c i:/MIOS32/trunk/modules/msd/LPC17xx/msc_scsi.c: In function 'SCSIHandleCmd': i:/MIOS32/trunk/modules/msd/LPC17xx/msc_scsi.c:155:14: warning: variable 'dwLBA' set but not used [-Wunused-but-set-variable] Creating object file for freertos_heap.cpp c:/mios32_toolchain/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld.exe: project_build/project.elf section `.bss' will not fit in region `RAM' c:/mios32_toolchain/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 672 bytes collect2.exe: error: ld returned 1 exit status make: *** [project_build/project.elf] Error 1 Thanks, Marco. Quote Link to comment Share on other sites More sharing options...
TK. Posted October 10, 2017 Report Share Posted October 10, 2017 It seems that your repository contains expired source files, this compile problem for LPC17 has been fixed some time ago. Just update your subversion repository Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Dj Marco BH Posted October 10, 2017 Author Report Share Posted October 10, 2017 I updated today, and the problem continues.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.