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.

Filter by
Sorted by
Tagged with
1
vote
1answer
440 views

External interrupt does not work on Proteus (PIC16F883)

I'm developing a basic circuit for a shooting game. When some area of the target is reached the microcontroller must add the current value to the reached value. My problem is that I can not make any ...
0
votes
0answers
407 views

creating port pin's Array in Hi-tech C

I am using pic16f887 microcontroller and using Hi-tech C compiler. I want to implement port pin's Array in Hi-tech but it is not allowing me to do so. What is the correct way to access pin address ...
3
votes
3answers
3k views

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 ...
-1
votes
1answer
190 views

PIC18F25K80 and WiFi [closed]

I want to send information over wifi from my PIC to PC. I need some basic tutorials or guides on this topic. I have searched online but there is no tutorial that starts from the basic. Can anyone ...
0
votes
1answer
3k views

Virtual terminal not showing data

I am new to PIC programming and I am doing an exercise with UART. After building the program the message is not being displayed. Can someone tell me where I am wrong. BAUDRATE = 9600, _XTAL_FREQ = ...
3
votes
4answers
1k views

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 ...
1
vote
2answers
440 views

Set function to specific address in PIC18F with the HI-TECH C compiler

I want to put a function in an specific address of memory like PIC C Compiler (#org). I'm using MPLAB X, HI-TECH compiler and PIC18F4550. In PIC C compiler: ...
1
vote
2answers
1k views

Microchip XC8: multi-byte assignment with reverse endian

Most, if not all, chips targeted by XC8 process one byte at a time. To assign a value from one multi-byte variable to another, it has to load the first 8 bits from the source into WREG and store them ...
2
votes
1answer
2k views

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 ...
1
vote
1answer
609 views

PIC microcontroller pin stopped working

I am just learning how to use microcontrollers, and I have built simple circuits using the PIC16F877A. I have built a simple circuit that flashes the pins on PORTB on and off by setting PORTB to 0xFF ...
1
vote
2answers
1k views

PIC output is high before being set high automatically

I am creating a simple pic project that uses a PIC16F877A and I have noticed something that seems odd. Before using any code to change the state of the pins connected to port b, the port b pins are ...
3
votes
1answer
1k views

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 ...
3
votes
3answers
291 views

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: ...
2
votes
1answer
759 views

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 ...
2
votes
1answer
1k views

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: ...
3
votes
3answers
2k views

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 ...
9
votes
2answers
1k views

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 ...
7
votes
3answers
586 views

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 ...
1
vote
1answer
342 views

PICC18: Certain __CONFIG() -macros cause syntax errors

...
1
vote
3answers
3k views

How do I write and upload a LED blink program on a PIC (pic16f59)?

I have a PIC16F59 and I want to get started with it by writing a blinking LED program. I am using HI-TECH C for the PIC10/12/16 MCU Family and the PICkit3 and MPLAB X as my IDE. Here is my attempted ...
2
votes
3answers
788 views

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 ...
4
votes
1answer
3k views

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 ...
1
vote
3answers
531 views

What are chip name macros are available in the HI-TECH C compiler?

I am using the HI-TECH C compiler for the PIC16 Microcontroller, and I would like to conditionally compile different chunks of code depending on which specific microcontroller has been selected. I ...
2
votes
4answers
6k views

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 ...
7
votes
5answers
6k views

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, ...
4
votes
4answers
3k views

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 ...