Search found 92 matches

by giovaniluigi
11 Jul 2017 17:48
Forum: mikroBasic PRO for PIC32 General
Topic: CAN Bus - Messages being received by ONLY some nodes.
Replies: 2
Views: 2464

Re: CAN Bus - Messages being received by ONLY some nodes.

Found the problem... The bit timing was wrong. Amazingly it could read from the bus but when writing, only devices with the same BRP/SEG1/SEG2/PROP/SJW would be able to read. It is almost impossible to believe that it was being able to actually read any byte... Used the CANCULATOR from Libstock and ...
by giovaniluigi
10 Jul 2017 22:47
Forum: mikroBasic PRO for PIC32 General
Topic: CAN Bus - Messages being received by ONLY some nodes.
Replies: 2
Views: 2464

CAN Bus - Messages being received by ONLY some nodes.

I have a CAN Bus with 4 devices. The bus is running at 250 k/s, with 29-bit IDs. Two of these devices are PIC32MX795F512L running my code. ( I will call 'my devices') The third device is a USB<>CAN adapter ( I will call 'usb adapter') The fourth is an industrial controller. ( I will call 'controller...
by giovaniluigi
14 Sep 2016 06:33
Forum: mikroBasic PRO for PIC32 General
Topic: PWM_Init() initializes what mode?
Replies: 4
Views: 4601

Re: PWM_Init() initializes what mode?

Lana, I agree with you. But I want to be careful before eliminating the compiler as the cause. I have had problems with a PIC32 before and it was because some wrong "decision" the compiler was taking on my interrupt vectors. It seems that disabling the interrupts on this PIC the problem is going awa...
by giovaniluigi
09 Sep 2016 18:50
Forum: mikroBasic PRO for PIC32 General
Topic: PWM_Init() initializes what mode?
Replies: 4
Views: 4601

Re: PWM_Init() initializes what mode?

Hi Lana I am using my own board with PIC32MX795F512L. I looked at the errata and I couldn't find any reference of a PWM missing one match under any circumstance. It is like I get one full cycle at random times. I first thought about error in the timer settings or even some portion of the code messin...
by giovaniluigi
08 Sep 2016 17:55
Forum: mikroBasic PRO for PIC32 General
Topic: PWM_Init() initializes what mode?
Replies: 4
Views: 4601

PWM_Init() initializes what mode?

Hi everyone, The PWM_Init() routine initializes the output compare module with what settings? Are the fault pins enabled or disabled? I have a PIC32MX795F512L generating a PWM of 500Hz and I am experiencing a glitch at apparent random time. I am using 80MHz, PBus clock is same as main clock, and I a...
by giovaniluigi
03 Sep 2016 19:21
Forum: mikroBasic PRO for PIC32 General
Topic: mikroE HID Bootloader - App start RESET address
Replies: 8
Views: 7264

Re: mikroE HID Bootloader - App start RESET address

Filip, One more question: Execution of code in PIC32 starts from 0xBFC00000. Then on the address 0xBFC00000 + 0x40 jump is made to the __BootStartUp of the bootloader, so the control is handed to the bootloader. Checking HEX of the bootloader the BootResetVector() routine starts at 0xBFC00000 and en...
by giovaniluigi
03 Sep 2016 18:38
Forum: mikroBasic PRO for PIC32 General
Topic: mikroE HID Bootloader - App start RESET address
Replies: 8
Views: 7264

Re: mikroE HID Bootloader - App start RESET address

Hi Filip, Thanks for your reply. I just want you to clarify two things. The first doubt is about the __BootStartUp routine: Is that a standardized routine that is always generated in HEX files? including HEX compiled in MPLAB? What is that routine about? Should I jump to 0xBFC00040 or to 0xBFC00000 ...
by giovaniluigi
29 Aug 2016 19:18
Forum: mikroBasic PRO for PIC32 General
Topic: mikroE HID Bootloader - App start RESET address
Replies: 8
Views: 7264

Re: mikroE HID Bootloader - App start RESET address

The HEX file that I want to upload to the MCU has 296 bytes starting at position 0x1FC00000 (RESET VECTOR) The HEX was generated by mikroBasic PRO for PIC32. Your bootloader reserves 16 bytes for a RESET VECTOR. Not sure why this number of bytes. Is there any reason for this to be exactly 16 bytes? ...
by giovaniluigi
29 Aug 2016 01:48
Forum: mikroBasic PRO for PIC32 General
Topic: mikroE HID Bootloader - App start RESET address
Replies: 8
Views: 7264

mikroE HID Bootloader - App start RESET address

Hi I am using the HID Bootloader code in a P32MX534F064H. I developed a PC software to send the HEX to the PIC, and it seems to be working, except one problem. When I upload my app the bootloader won't start again if I reset the PIC. Using your mikroe bootloader PC software and then it works fine. I...
by giovaniluigi
23 Aug 2016 17:21
Forum: mikroC PRO for ARM General
Topic: USB_Break();
Replies: 5
Views: 5850

Re: USB_Break();

Hi,

So you don't need to wrap it with a while block. Right?

Thanks.
by giovaniluigi
21 Aug 2016 00:53
Forum: mikroC PRO for ARM General
Topic: USB_Break();
Replies: 5
Views: 5850

Re: USB_Break();

In the Help files you have an example of the HID_Write() with the following code: // retry until success while(!HID_Write(&writebuff,64)) ; In the notes you have: Function call needs to be repeated as long as data is not successfuly sent. This is a blocking routine which can block the program flow. ...
by giovaniluigi
20 Aug 2016 19:55
Forum: mikroBasic PRO for PIC32 General
Topic: Code to use in Microchip Bootloader
Replies: 8
Views: 6593

Re: Code to use in Microchip Bootloader

Hi, I know that this reply is out of date but for the futuristic readers: I think that the reply from biljana is not accurate. As far as I remember you should NOT load the whole HEX file using the bootloader. You should analyze each row and skip the data of the configuration bits (aka switches). Th...
by giovaniluigi
09 Aug 2016 17:16
Forum: mikroBasic PRO for PIC32 General
Topic: Code to use in Microchip Bootloader
Replies: 8
Views: 6593

Re: Code to use in Microchip Bootloader

Hello, I decided to move on with your Bootloader. My only problem now, is that your PC app doesn't fit my purpose. I need to develop my own PC app. In order to do that, I would need to understand how your PC app works. As I have the source of the bootloader in the Examples folder, I can get the main...
by giovaniluigi
08 Aug 2016 17:56
Forum: mikroBasic PRO for PIC32 General
Topic: Code to use in Microchip Bootloader
Replies: 8
Views: 6593

Re: Code to use in Microchip Bootloader

I would be using Microchip's IDE to compile their Bootloader code then I would load a firmware generated by MikroBasic PRO for PIC32. My doubts were about the memory locations and interrupt vectors. I then found your Bootloader and it seems a good one. I will be using it then. However I can't use yo...

Go to advanced search