Search found 1786 matches

by hexreader
21 Oct 2022 22:40
Forum: mikroC PRO for PIC General
Topic: StartUSB based on PIC18f2550, MicroC PRO 7.6 and arithmetic expression - issue or feature ?
Replies: 5
Views: 858

Re: StartUSB based on PIC18f2550, MicroC PRO 7.6 and arithmetic expression - issue or feature ?

Read the help file section "Operators Precedence and Associativity"

.... or any good C language resource ...
by hexreader
21 Oct 2022 21:38
Forum: mikroC PRO for PIC General
Topic: StartUSB based on PIC18f2550, MicroC PRO 7.6 and arithmetic expression - issue or feature ?
Replies: 5
Views: 858

Re: StartUSB based on PIC18f2550, MicroC PRO 7.6 and arithmetic expression - issue or feature ?

Short answer - overflow Long answer: unsigned int tmr0 = 65536U - (10 * 1000U * 48 / (4 * 2)); Those values are unsigned integers Maximum value for an unsigned integer is 65535 10 * 1000 * 48 = 480000 480000 is much larger than the maximum value that unsigned int can be, so it will get truncated fro...
by hexreader
21 Oct 2022 10:42
Forum: mikroC PRO for PIC General
Topic: StartUSB based on PIC18f2550, MicroC PRO 7.6 - Timer0 settings ! How ?
Replies: 3
Views: 685

Re: StartUSB based on PIC18f2550, MicroC PRO 7.6 - Timer0 settings ! How ?

Yes MCU clock speed depends on external 8 MHz 2-pin crystal on the StartUSB board The 8MHz crystal is used for the PIC oscillator circuitry and is divided and multiplied to give various possible MCU clock frequencies See section 2 of the datasheet Configuration bits set the various divider options a...
by hexreader
21 Oct 2022 00:47
Forum: mikroC PRO for PIC General
Topic: StartUSB based on PIC18f2550, MicroC PRO 7.6 - Timer0 settings ! How ?
Replies: 3
Views: 685

Re: StartUSB based on PIC18f2550, MicroC PRO 7.6 - Timer0 settings ! How ?

You need to enter the MCU clock frequency, not the external crystal frequency

MCU clock frequency depends on many configuration settings, but StartUSB generally uses a 48MHz clock (I think)

Try using 48MHz as clock frequency for timer calculator.
by hexreader
20 Oct 2022 18:20
Forum: mikroC PRO for PIC General
Topic: Problem to set i2C remappable using pps 16(L)F18346 SOLVED
Replies: 5
Views: 917

Re: Problem to set i2C remappable using pps 16(L)F18346

Cannot help with display functions, as I do not own a compatible display. Here is my attempt at I2C operation. Maybe it will give you a start... ////////////////////////////// UART TEST /////////////////// // // PIN OUT: // RC5 --> TX (for debug) // RC4 --> RX (for debug) // // /////////////////////...
by hexreader
19 Oct 2022 11:01
Forum: mikroC PRO for PIC General
Topic: Interrupt 16bit Timer0 using 16(L)F18346 not work SOLVED
Replies: 4
Views: 759

Re: Interrupt 16bit Timer0 using 16(L)F18346 not work

LAT register for output
Enable T0 interrupts
Enable global interrupts

Improved code is attached
by hexreader
18 Oct 2022 18:18
Forum: mikroC PRO for PIC General
Topic: Difficoult set clock using 16F18346 mcu, How can i do? SOLVED
Replies: 2
Views: 682

Re: Difficoult set clock using 16F18346 mcu, How can i do?

Wow! so many things wrong.... so many things confused.... 1) The only way to obtain 32MHz clock from a 2-pin crystal is to use an 8MHz crystal with 4x PLL 20MHz 2-pin crystal can only give 20MHz clock 2) I will give you project settings of 16MHz internal oscillator and 2x PLL once you answer questio...
by hexreader
15 Oct 2022 01:13
Forum: PIC AI compilers
Topic: device detectted: unknow
Replies: 8
Views: 1442

Re: device detectted: unknow

For PIC18 and newer PIC16 chips, use LAT registers for output and PORT registers for input Corrected code is: // Testing sprecial functions on MikroC // #include "Special_functions.h" // LCD module connections sbit LCD_RS at LATB4_bit; sbit LCD_EN at LATB5_bit; sbit LCD_D4 at LATB0_bit; sbit LCD_D5 ...
by hexreader
12 Oct 2022 11:35
Forum: Development Boards
Topic: Fusion for PIC32 v8 will not program PIC32MZ2048EFH144 - SOLVED
Replies: 8
Views: 1119

Re: Fusion for PIC32 v8 will not program PIC32MZ2048EFH144

Did a bit more investigation, but now I am confused... Tried all of my MZ processors with short programming leads and each development board externally powered, with the following results: PIC32 Dev Board Codgrip MikroProg PIC32MZ2048EFH100 Flip and Click Good Good Device Revision Id = 0xA3 PIC32MZ2...
by hexreader
10 Oct 2022 17:07
Forum: Development Boards
Topic: Fusion for PIC32 v8 will not program PIC32MZ2048EFH144 - SOLVED
Replies: 8
Views: 1119

Re: Fusion for PIC32 v8 will not program PIC32MZ2048EFH144

Thanks filip, I very much appreciate the reply Yes, Codegrip firmware on latest version 1.6.0 Codegrip utility on latest version 1.6.0 Problem solved on uni-clicker by using mikroProg, rather than stand-alone codegrip programmer with suite 1.6.0 and firmware 1.6.0 - but, I am OK with that Unable to ...
by hexreader
07 Oct 2022 10:31
Forum: mikroC PRO for PIC General
Topic: strchr
Replies: 1
Views: 653

Re: strchr

I think that you are stuck in a BASIC mind-set You need to adjust to a C mind-set for instance, this is not valid C: SubString = "100150C4304E2512" ; res needs to be a pointer, not a byte res will give the memory address where it found 'C', not it's position in the string the way BASIC does Here is ...
by hexreader
29 Sep 2022 22:07
Forum: Development Boards
Topic: Fusion for PIC32 v8 will not program PIC32MZ2048EFH144 - SOLVED
Replies: 8
Views: 1119

Fusion for PIC32 v8 will not program PIC32MZ2048EFH144 - SOLVED

Anyone know a handy trick to program PIC32MZ2048EFH144 SiBRAIN MIKROE - 4375 on Fusion for PIC32 v8 board MIKROE - 4372 please? Programming of as-delivered PIC32MX795F512L works perfectly either from codegrip standalone utility, or from NECTO IDE MZ board will detect reliably, will sometimes read, b...
by hexreader
27 Sep 2022 18:15
Forum: CODEGRIP programmer and debugger
Topic: Add the PIC18FxxK83 family to CODEGRIP
Replies: 14
Views: 1809

Re: Add the PIC18FxxK83 family to CODEGRIP

Hi filip, Thanks for the tip Would you be willing to concede that the exact same configuration will not work for easyPIC v7, v7a? A crossover RJ12 cable would be needed for v7 In other words, easyPIC 8 is wired in reverse, compared to easpic 7 EasyPIC 7 wiring matches Microchip development board wir...
by hexreader
26 Sep 2022 23:13
Forum: IDE General
Topic: Mikroc to Necto Migration Guide?
Replies: 5
Views: 1040

Re: Mikroc to Necto Migration Guide?

Necto is free for non-commercial use. If you already have an old-style compiler licence, you will get a year's free commercial licence (I think) ---- or maybe it is only if you paid for Necto compiler already - not sure which Plenty of opportunity to try before you buy. Use legacy mode for older cod...

Go to advanced search