Search found 40 matches

by dquy05
26 Apr 2022 08:54
Forum: mikroC PRO for ARM General
Topic: Initialization error with struct
Replies: 1
Views: 906

Re: Initialization error with struct

Hi, After editing, typedef enum eFsmStat { FS_STARTUP = 0, FS_MENU_MODE, FS_MOTOR_MODE, FS_CALIBRATION_MODE, FS_ANTICOGGING_MODE, FS_UART_SETUP, }tFsmStat; typedef struct sFSM { tFsmStat state; tFsmStat next_state; unsigned char ready; char cmd_buff[64]; unsigned char bytecount; }tFSM; static tFSM F...
by dquy05
26 Apr 2022 05:45
Forum: mikroC PRO for ARM General
Topic: Initialization error with struct
Replies: 1
Views: 906

Initialization error with struct

Hello ! I have the below initialization code, but it gives an error typedef enum eFsmStat { FS_STARTUP = 0, FS_MENU_MODE, FS_MOTOR_MODE, FS_CALIBRATION_MODE, FS_ANTICOGGING_MODE, FS_UART_SETUP, }tFsmStat; struct sFSM { tFsmStat state; tFsmStat next_state; unsigned char ready; char cmd_buff[64]; unsi...
by dquy05
12 Jan 2022 04:26
Forum: ARM PRO Compilers
Topic: Scheme STM32F405RGT6
Replies: 4
Views: 2214

Re: Scheme STM32F405RGT6

qwepoi wrote: ↑
17 May 2021 08:39
Use Stm32cubeMX to configure your clocks .

PS : Settings for 25MHZ oscillator
Many thanks !
by dquy05
08 Jan 2022 10:47
Forum: mikroC PRO for ARM General
Topic: Timer read Encoder
Replies: 5
Views: 1442

Re: Timer read Encoder

Hi,
Can someone help me take a look? I am very stuck with STM32F4,

Regards !
by dquy05
05 Jan 2022 15:55
Forum: mikroC PRO for ARM General
Topic: Timer read Encoder
Replies: 5
Views: 1442

Re: Timer read Encoder

Hi ! I look in the STM32F407VG.c file, there is 1 error I think it is a typo, so the library is corrupt typedef struct tagTIM4_CCMR1_InputBITS { union { struct { unsigned CC1S : 2; unsigned ICPCS : 2; // I think it should be IC1PCS unsigned IC1F : 4; unsigned CC2S : 2; unsigned IC2PCS : 2; unsigned ...
by dquy05
05 Jan 2022 15:00
Forum: mikroC PRO for ARM General
Topic: Timer read Encoder
Replies: 5
Views: 1442

Re: Timer read Encoder

Hi !

I tried on STM32F405RG and STM32F407VG both no signal (same configuration as above but STM32F103C8 worked)
Can someone help me? I'm really stuck for a long time, my project is very urgent

Thank you very much !
by dquy05
04 Jan 2022 03:33
Forum: mikroC PRO for ARM General
Topic: Timer read Encoder
Replies: 5
Views: 1442

Re: Timer read Encoder

Hi,
I found out, on STM32F4 there are 2 channels TIM4_CH1_PB6 and TIM4_CH1_PD12, so how do I configure to choose the right one?

Many thanks!
by dquy05
03 Jan 2022 14:58
Forum: mikroC PRO for ARM General
Topic: Timer read Encoder
Replies: 5
Views: 1442

Re: Timer read Encoder

Hi,
I tried this code on F1 and it worked, but on STM32F405RG it gives no signal (TIM4_CNT value is always =0), can anyone help me where to correct it?

Many thanks!
by dquy05
03 Jan 2022 09:41
Forum: mikroC PRO for ARM General
Topic: How to read quad encoder interface!
Replies: 7
Views: 4465

Re: How to read quad encoder interface!

Hi! you can read it by reading TIMx_CNT registry. Hi, I am using timer to read encoder, when using external interrupt it works, but when using timer encoder available in STM32F4, the documentation on internet I can't find, only this code, but it doesn't works, can anyone help me on how to use it, a...
by dquy05
03 Jan 2022 08:42
Forum: mikroC PRO for ARM General
Topic: Timer read Encoder
Replies: 5
Views: 1442

Timer read Encoder

Hi, I am using timer to read encoder, when using external interrupt it works, but when using timer encoder available in STM32F4, the documentation on internet I can't find, only this code, but it doesn't works, can anyone help me on how to use it, as well as related documentation? GPIO_Config(&GPIOB...
by dquy05
25 Oct 2021 15:06
Forum: mikroC PRO for ARM General
Topic: SD card interface to read and write .csv file mode FAT32
Replies: 9
Views: 2152

Re: SD card interface to read and write .csv file mode FAT32

Hello again does your uC support FSMC? I just read, that this would be the external BUS for external RAM: https://www.st.com/content/ccc/resource/technical/document/application_note/27/bf/f5/e8/d7/82/44/6f/CD00200423.pdf/files/CD00200423.pdf/jcr:content/translations/en.CD00200423.pdf Gerhard Hi, Th...
by dquy05
25 Oct 2021 02:02
Forum: mikroC PRO for ARM General
Topic: SD card interface to read and write .csv file mode FAT32
Replies: 9
Views: 2152

Re: SD card interface to read and write .csv file mode FAT32

Im not so familia to external storage, that i know by sure that they allow access to a single byte. So every solution depends on a dedicated size, for example 512Byte of your SD-card. You write 512Byte at one time and read 512Byte at one time. But SDcards have 4GB and more, so that should be enough...
by dquy05
24 Oct 2021 15:14
Forum: mikroC PRO for ARM General
Topic: SD card interface to read and write .csv file mode FAT32
Replies: 9
Views: 2152

Re: SD card interface to read and write .csv file mode FAT32

Yes, sure, but FLASH-chips, i think are slower than RAM. There are also SPI-RAM chips available: f.e.: https://www.digikey.de/de/product-highlight/m/microchip-technology/spi-serial-sram-nvsram-devices You dont need to erase, you only write and read. Your code above was written for use with a SD-CAR...
by dquy05
24 Oct 2021 09:47
Forum: mikroC PRO for ARM General
Topic: SD card interface to read and write .csv file mode FAT32
Replies: 9
Views: 2152

Re: SD card interface to read and write .csv file mode FAT32

Hello it seems, that this is the wrong function for your purpose. This function does not support a position in the file you want to write. I am not familiar to the functions you have available, but i think you need a function, that writes a designated part of your RAM to the SD-CARD. In this RAM yo...
by dquy05
21 Oct 2021 13:26
Forum: mikroC PRO for ARM General
Topic: SD card interface to read and write .csv file mode FAT32
Replies: 9
Views: 2152

SD card interface to read and write .csv file mode FAT32

Hi, I need to write and read .csv or .xls files, writable to the rows and columns I want, as well as inset or delete rows and columns With the program below, I can only write to row 1 and column 1 FAT32_ChangeDir("\\"); // ve main FAT32_Close(0); FAT32_MakeDir("Test"); // tao folder neu chua tao FAT...

Go to advanced search