Questions tagged [hi-tech-compiler]

HI-TECH C is a world class brand of compilers for Microchip Technology's 8-, 16-, and 32-bit PIC microcontroller and dsPIC digital signal controller architectures.

HI-TECH C is a world class brand of compilers featuring Omniscient Code Generation, whole-program compilation technology, for Technology's 8-, 16-, and 32-bit microcontroller and dsPIC digital signal controller architectures.

26 questions
9
votes
2 answers

Need some help understanding PIC memory map

Some background. I use MPLABx with a PicKit2 to program different types of pics. At the moment its the 16F887. I try to stick to the Hi-Tech PICC Lite tool chain but I'm growing increasingly unhappy with how some things are assembled. Operations…
Michael
  • 948
  • 1
  • 7
  • 23
7
votes
5 answers

What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port?

What causes turning ON a single output pin on Microchip PIC16F690 to spontaneously turn OFF another pin on the same port? I can work around this problem by writing a byte to the entire port, controlling all pins simultaneously, instead of just a bit…
Dave.Mech.Eng
  • 1,745
  • 3
  • 17
  • 21
7
votes
3 answers

Extraneous loop produced by PIC compiler from MicroChip

We're using the Lite version of the MicroChip PIC compiler so maybe that's the reason, but this simple one-bit shift is generating a loop where none is necessary. Since the shift count is 1 (a constant), I would expect the compiler to create no…
I. J. Kennedy
  • 397
  • 1
  • 9
4
votes
4 answers

What PIC24 C compilers are out there, and what is your opinion or review on them?

Specifically, the PIC24 series. I tried out microchips C30 compiler, but it seems to be a bit too complicated for me, and I couldn't find any libraries with it. Then I tried CCS, and it seems far too simple, and I cannot view the code for say,…
hak8or
  • 1,070
  • 11
  • 23
4
votes
1 answer

Extended Instruction Set mode for PIC18F with Hi-Tech Compiler

I'm writing some firmware for a PIC18F6622 microcontroller. I use MPLAB IDE 8.73 + HI-TECH C Compiler for PIC18 MCUs (PRO) 9.66. When I set the XINST (Extended Instruction Set enable bit), the IDE gives me this warning: What settings should I do to…
m.Alin
  • 10,638
  • 19
  • 62
  • 89
3
votes
1 answer

Migrated from C18 to Hi-Tech C 18.. Interrupt not working

Here is my source code. This code is working perfectly fine in C18 Compiler. Not until I migrated to Hi Tech C. It does not enter the interrupt service routine. Moreover, it somehow corrupted sid variable passed on to a function. Instead of passing…
Xegara
  • 431
  • 1
  • 4
  • 13
3
votes
3 answers

PIC warning 364 related to initialization of const

There are no answers to this on the internet that I could find, and I've looked twice over the last 4 months. In MPLab v8.88 using the Hi-Tech ANSI C Compiler, I have this line of code: const uint8 SUM_THRESHOLD_MIN = 15; /* comment edited out …
Bob
  • 848
  • 2
  • 9
  • 21
3
votes
3 answers

Can I pass a bit register as a function argument in Hi-Tech C compiler for PIC16?

Is there a way to pass a bit from a PIC's register as a function parameter? Taking, for example, the PIC16F887, its registers (SFRs) and individual bits are defined as fallows in the corresponding header file (...\HI-TECH…
m.Alin
  • 10,638
  • 19
  • 62
  • 89
3
votes
3 answers

Using I2C and SPI communication on the same same clock and data lines

I am using a PIC18F25K80 with multiple slave devices. All of them uses I2C except one. What i want to know is that can i first use I2C with the devives that uses I2C and then close I2C, change clock speed and switch to SPI mode ? Is this poosible…
sangam.saga
  • 83
  • 1
  • 2
  • 7
3
votes
4 answers

GOTO a specific address in HI-TECH C Compiler PIC18F

I'm trying to jump to a specific address in HI-TECH compiler and the address is given dynamically. I tried using asm() function but it looks like the argument must be a constant char[]. Is there another solution to jump to an address using goto or…
788498
  • 45
  • 6
2
votes
1 answer

How to get two buttons to work with the 16f628a - C, Hi-tech comp, mplabx

I'm just began exploring my new hobby - mcu electronics. I have bought an 16f628a after reading some forumposts suggestion that is a good mcu for beginners. I have download mplabX, the hi-tech compiler and the isis program for simulating my circuit…
Bjorn
  • 121
  • 2
2
votes
1 answer

EEPROM and CONFIG macros on PIC with HI-TECH compiler

I have seen 2 lines of source code that I can't find documented anywhere. They are: __CONFIG (0x03d4); __EEPROM_DATA (0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); I assume that __EEPROM_DATA() writes data to the eeprom at address 00-07 in the…
Dean
  • 8,408
  • 27
  • 70
  • 120
2
votes
3 answers

Am I overclocking a PIC18F4525?

I'm working on a legacy product, so I can't adjust the crystal or board in any way. It was originally written in PicBasicPro and I'm moving things over to Hi-Tech C. It's a Pic18F4525 and has a 20Mhz crystal. According to the datasheet, the PLL just…
David Rinck
  • 123
  • 6
2
votes
4 answers

PIC UART Interrupt Not Triggering

I have PIC16F628A that I am trying to have read from UART. Without interrupts, it reads the first 3 bytes fine but hits an OERR. To combat this, I thought an interrupt would be good and load any received bytes into a buffer variable that could be…
Teagan
  • 21
  • 1
  • 3
2
votes
1 answer

Hi tech c adc code not working as expected

I am new to using PIC micro-controllers, and I am working on a project that involves reading an analog value. I am using the PIC16F877A. I have found code for using the ADC posted below however when I try to compile it I get the error Error …
Markovian8261
  • 469
  • 2
  • 8
  • 29
1
2