![]() |
Forum Index : Microcontroller and PC projects : stmF7Mite repport
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
phantomnet Newbie ![]() Joined: 21/09/2015 Location: United KingdomPosts: 9 |
Zonker: Board is STM32F746G-DISCO from ST link Firmware is MMBasic 4.5 like in this topic. |
||||
derexponent Newbie ![]() Joined: 20/09/2015 Location: GermanyPosts: 24 |
i just uploaded a new version (a36) > 10 color blue,white > 20 print "asdasda" > run asdasda > its not working !!! should work now and here a video with 3D-Objects-Functions from Fabrice 3dObjects-video here a second video to demonstrate the multitouch multitouch leave a comment if spi should have more settings (like LSB/MSB, more speed options) Uwe |
||||
derexponent Newbie ![]() Joined: 20/09/2015 Location: GermanyPosts: 24 |
ADC is comming next --> EDIT : ADC is working with new update A.37 but the two DAC-Ports are not routed to the Arduino connector (and used for other functions) but the board has a two channel sound DAC on a headphone jack so maybe we can handle analog output at this way or PWM at a normal GPIO with an external RC filter. Uwe |
||||
phantomnet Newbie ![]() Joined: 21/09/2015 Location: United KingdomPosts: 9 |
Uwe: SPI working good. If You can add more options it will be more flexible. I have found another issue: Some times (every 20-30sec) during do/loop in test sub lcd loosing horizontal synchro for 1-2 frames. It is simple scanner using RF1100SE board with CC1101 chip. Sub test() graph_init() 'draw layout spi_setup() 'spi setup cc1101_setup() 'set CC1101 registers Do For cc= 0 To 63 '64 channels Line((cc*4)+204,210)-((cc*4)+206,20),Black,BF 'clear prev draw spiWriteReg(&h0A,cc) ' set new channel rr=RSSI(spireadreg(&hf4)) ' read RSSI level Pixel((cc*4)+204,100-rr)=Red ' draw level dots Pixel((cc*4)+205,100-rr)=Red Pixel((cc*4)+206,100-rr)=Red If tocz(5,22,85,72)=1 GoTo go_out 'check touch Next cc Loop go_out: SPI close 1 'close spi End Sub Sub graph_init() Color White,Black Cls 0 Line(0,0)-(479,18),50712,BF 'top status bar Line(5,22)-(85,72),50712,BF 'draw button Color Black,50712 'color for button label Print @(19,41) "Stop scan" 'botton label Line(203,24)-(459,24),Blue Line(203,222)-(459,222),Blue 'drawing dots net For i=0 To 23 Step 4 Line(203,24+(i*8))-(459,24+(i*8)),Blue Next i For i=0 To 32 Step 4 For j=0 To 24 Line((i*8)+203,219-(j*8))-((i*8)+203,217-(j*8)),Blue Next j Next i End Sub Function tocz(x1,y1,x2,y2) Local n n=MTouched(#s) If (n=1) Then x=MTouched(#x,1) y=MTouched(#y,1) If (x>=x1)And(x<x2)And(y>y1)And(y<y2) Then tocz=1 Else tocz=0 EndIf Else tocz=0 EndIf End Function '************************************************************************* ' CC1101 SPI functions '************************************************************************* Function RSSI(val) If val>=128 Then RSSI=((val-256)/2)-74 If val<128 Then RSSI=(val/2)-74 End Function Sub SPI_setup() ' SPI port setup SetPin 9,din ' GDO0 = D08 SetPin 10,din ' GDO2 = D09 SetPin 11,dout ' CS = D10 SetPin 12,spi1_mosi ' SI = D11 SetPin 13,spi1_miso ' SO = D12 SetPin 14,spi1_sck ' SCLK = D13 SetPin 15,dout ' led = D14 SetPin 23,din SPI OPEN 1,h,0 End Sub Sub spiWriteReg(addr,val) Local sp Pin(11)=0 sp=SPI(1,addr) sp=SPI(1,val) Pin(11)=1 End Sub Function spiReadReg(addr) Local sp Pin(11)=0 sp=SPI(1,addr) spiReadReg=SPI(1,0) Pin(11)=1 End Function Sub cc1101_setup() spiWriteReg(&h30,&h00) 'command SRX spiWriteReg(&h0b,&h0b) 'FSCTRL1(0x0B)=0x0B spiWriteReg(&h0C,&h00) 'FSCTRL0(0x0C)=0x00 spiWriteReg(&h0D,&h10) 'FREQ2(0x0D)=0x10 spiWriteReg(&h0E,&h10) 'FREQ1(0x0E)=0xA7 spiWriteReg(&h0F,&h62) 'FREQ2(0x0F)=0x62 spiWriteReg(&h10,&h2D) 'MDMCFG4(0x10)=0x2D spiWriteReg(&h11,&h3B) 'MDMCFG3(0x11)=0x3B spiWriteReg(&h12,&h73) 'MDMCFG2(0x12)=0x73 spiWriteReg(&h13,&h22) 'MDMCFG1(0x13)=0x22 spiWriteReg(&h14,&hF8) 'MDMCFG0(0x14)=0xF8 spiWriteReg(&h0A,&h00) 'CHANNR(0x0A)=0x00 spiWriteReg(&h15,&h00) 'DEVIANT(0x15)=0x00 spiWriteReg(&h21,&hB6) 'FREND1(0x21)=0xB6 spiWriteReg(&h22,&h10) 'FREND0(0x22)=0x10 spiWriteReg(&h18,&h18) 'MCSM0(0x18)=0x18 spiWriteReg(&h19,&h1D) 'FOCCFG(0x19)=0x1D spiWriteReg(&h1A,&h1C) 'BSCFG(0x1A)=0x1C spiWriteReg(&h1B,&hC7) 'AGCCTRL2(0x1B)=0xC7 spiWriteReg(&h1C,&h00) 'AGCCTRL1(0x1C)=0x00 spiWriteReg(&h1D,&hB2) 'AGCCTRL0(0x1D)=0xB2 spiWriteReg(&h23,&hEA) 'FSCAL3(0x23)=0xEA spiWriteReg(&h24,&h0A) 'FSCAL2(0x24)=0x0A spiWriteReg(&h25,&h00) 'FSCAL1(0x25)=0x00 spiWriteReg(&h26,&h11) 'FSCAL0(0x26)=0x11 spiWriteReg(&h29,&h59) 'FTEST(0x29)=0x59 spiWriteReg(&h2C,&h88) 'TEST2(0x2C)=0x88 spiWriteReg(&h2D,&h31) 'TEST1(0x2D)=0x31 spiWriteReg(&h2E,&h0B) 'TEST0(0x2E)=0x0B spiWriteReg(&h00,&h0B) 'IOCFG2(0x00)=0x0B spiWriteReg(&h02,&h06) 'IOCFG0(0x00)=0x06 spiWriteReg(&h07,&h04) 'PKTCTRL1(0x07)=0x04 spiWriteReg(&h08,&h05) 'PKTCTRL0(0x08)=0x05 spiWriteReg(&h09,&h00) 'ADDR(0x09)=0x00 spiWriteReg(&h06,&hFF) 'PKTCTRL1(0x06)=0xFF spiWriteReg(&h31,&h00) 'command SFCTXON spiWriteReg(&h34,&h00) 'command SRX End Sub Any suggestions ? Regards |
||||
darthmite![]() Senior Member ![]() Joined: 20/11/2011 Location: FrancePosts: 240 |
Hi ![]() I found this too , but don't forget , it's a alpha version :) With the code compiled in debug mode this issue appear some times , with full optimization of the code it appear often. We think to add a low level dma2d interrupt to know when we can start the next writing on screen. On the background rotating map with Sprites running in front at full optimization it's just too fast for the dma2d ![]() ![]() Cheers. PS : you got a nice setup on your st7 Disco ![]() Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
derexponent Newbie ![]() Joined: 20/09/2015 Location: GermanyPosts: 24 |
@phantomnet, the SPI-Pins dont have to set manualy. because they hardwired you can't change them anyway (like the com ports) so the code for your spi_setup is : Sub SPI_setup() ' SPI port setup SetPin 9,din ' GDO0 = D08 SetPin 10,din ' GDO2 = D09 SetPin 11,dout ' CS = D10 SetPin 15,dout ' led = D14 SetPin 23,din ' user button SPI OPEN 1,h,0 ' SPI(D11,D12,D13) and you can use the arduino label names for the pins : (perhaps i add the user button as 'B0') Sub SPI_setup() ' SPI port setup SetPin D8,din ' GDO0 = D08 SetPin D9,din ' GDO2 = D09 SetPin D10,dout ' CS = D10 SetPin D14,dout ' led = D14 SetPin 23,din ' user button SPI OPEN 1,h,0 ' SPI(D11,D12,D13) and remember, like Fabrice said, its an ALPHA the finetuning comes in BETA and its a long way till that day ![]() if you found major bugs let us know and go on testing ![]() |
||||
phantomnet Newbie ![]() Joined: 21/09/2015 Location: United KingdomPosts: 9 |
@derexponent, Thanks for info. If you please, add the info about default functions of each pin and explain what is SPI SCLK frequency in Mhz for L,M,H speeds. I stil remember that it is an ALPHA so i'm trying to test it as much i can and report bugs ![]() |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10089 |
Fabrice I'm playing with the sprite editor and can't make sense of the .bin file I assume the colours are in RGB565? Reading the file with a hex editor I get: red= FC00 green=83E0 blue=001F cyan=83FF magenta=FC1F yellow=FFE0 white=FFFF black=8000 It seems there is an extra bit set in red (bit 10) and also bit15 seems to be set incorrectly in other colours. Is this a bug or am I missing something? Thanks Peter |
||||
darthmite![]() Senior Member ![]() Joined: 20/11/2011 Location: FrancePosts: 240 |
Hi Math ![]() The new version from the program is making argb1555 pixel format for be used with the new sprite command integrated in the stmF7mite. So we don't have to take care on the transparent colour because the dma2d made that in background. If some here want a rgb565 output i can add one button for save in this format. The bit15 is what tell the dma2d that this colour is the transparent one. Cheers. Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
darthmite![]() Senior Member ![]() Joined: 20/11/2011 Location: FrancePosts: 240 |
I added the Load/Save in RGB565 option. But i cant attach the file here because the 500kb limitation. I will give the last version to Uwe Becker and he will put it on his page. You can load original maximite sprite file 2bit(black/white) and 3bit(8 colours) too. Now i think the soft must be complete ![]() Cheers. Here a picture from version 2.2: ![]() Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10089 |
Excellent - I look forward to trying it ![]() |
||||
derexponent Newbie ![]() Joined: 20/09/2015 Location: GermanyPosts: 24 |
i have uploaded the new version A.33 and the Sprite-Editor 2.2 new in this version : command "config" stores settings in external flash (write limit = 100.000 :-) 8 different speed settings for SPI (190kHz up to 50MHz -> have a look at the manual) Fabrice adds a few commands to handle polygons (demo is also online) UB. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10089 |
Fabrice the RGB565 save works great except I am struggling with one thing: I've set the last sprite to 1 in my test as I have two simple images. However, when I save the file and then reload it the number reverts to 499 and looking at the .bin file the first two bytes are F4, 01 =500 If I patch these bytes with the hex editor and then load the file the "last sprite" number is correct and stays correct after a subsequent save and reload. |
||||
darthmite![]() Senior Member ![]() Joined: 20/11/2011 Location: FrancePosts: 240 |
Ok Math , thanks for this info , i go look that now ![]() Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
darthmite![]() Senior Member ![]() Joined: 20/11/2011 Location: FrancePosts: 240 |
Correction done. Up that Uwe Becker drop it on his page you can use this workaround. Enter the new Last Sprite THEN press enter ![]() This was a funny one ... he he You will the see the scrollbar under the sprite resize his cursor , and you will not able to scroll more than the Last Sprite.(it was supposed to work like this from start). The new version read the textbox again before it go to save the file for prevent this to append again. Cheers. Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
derexponent Newbie ![]() Joined: 20/09/2015 Location: GermanyPosts: 24 |
bugfix is online |
||||
picman Newbie ![]() Joined: 16/10/2015 Location: United KingdomPosts: 1 |
Is the source code for this project available, or is it another closed source project? I have designed a new PCB with the stm32f7 which has HDMI and a fpga plus lots of other goodies and need some software, this looks like a good starting point. Better than starting from scratch. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3274 |
They are working under my license which restricts distribution of the source. When they are finished I plan to make the source available (with their permission) in the same manner as the current source to MMBasic is available. Geoff Graham - http://geoffg.net |
||||
darthmite![]() Senior Member ![]() Joined: 20/11/2011 Location: FrancePosts: 240 |
Hi ![]() I finished the mpu6050 lib integration (in c) and put the whole to new mmbasic command/function. Uwe is doing the i2c library , soon it will be ready ![]() The "Wii classic controller" lib is done but don't work now ... I wait up to Uwe finish the i2c lib and try again with this one ![]() For the Joystick it will be new command/function created in mmbasic too ... And with a very little effort , the Nunchuk can be integrated too , just good that i have some at home for testing ![]() See you soon for next news. Cheers. Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
derexponent Newbie ![]() Joined: 20/09/2015 Location: GermanyPosts: 24 |
i2c is running with 10 kHz to 400 kHz (but only in mode 0 = 8bit Slave-Address) MPU6050 is implemented but i cant test it (waiting for Fabrice ![]() i have also added RTC support (PCF8563 or PCF8583) but still some bugs to fix ![]() CU |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |