Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hi Tech "c"

Status
Not open for further replies.

binzer

Member
Is anybody using this? Trying to find documentation on I/O. I did d/l the docs I found at the site but did not find any I/O specific info.
I like the config / setup wizard, generates all of the config code for the chip.

Mike
 
Is anybody using this? Trying to find documentation on I/O. I did d/l the docs I found at the site but did not find any I/O specific info.
I like the config / setup wizard, generates all of the config code for the chip.

Mike

Hey, ya, I'm using it. It's my favourite compiler for PICs. Whats up?
 
looking for info on how to use the I/O, usart and adc. I did not find much in the manual on the download page.
Mike
 
looking for info on how to use the I/O, usart and adc. I did not find much in the manual on the download page.
Mike

Here is complete C code demonstrating use of UART on the PIC16F886:

My UART Code

For the chip 16F886 but a lot of other chips can be used to substitute given that they have UART and the like.

As for usage of IO, it's as easy as PORTC = 0x00 or PORTC = 0b10101010 in binary representation. Very easy to translate from assembler.

For example, to make my UART code above, I looked at the code here: 16F628 UART test and translated parts of it to C. Very easy to do.
 
Last edited:
And if you want to know how to use ADC, you can look at some sample ADC code in asm and port it to C. For example, my PICKIT2 demo board came with some sample applications in asm. One of the samples demonstrated the use of ADC. Take a look:

**broken link removed**

It's really easy to port to C.
 
Last edited:
The manual is actually quite useful. If you're using windows, it is in C:\Program Files\HI-TECH Software\PICC\PRO\9.60\docs or something like that. The file is called "manual.pdf". In Linux, it could be anywhere, lol. I would guess that it's somewhere in /usr/local. Search your filesystem for it, it should be there.

The datasheet for your microcontroller chip will also be very useful to get things going.
 
Thanks for that info, I tried the Hi Tech and liked the chip setup wizard but the manuals leave a bit to be desired (at least for me re-learning 'c'). I do use Linux as my desktop and have heard there is some pic software out there but have not tried it yet. I use RDP (Remote Desktop) to an old Dell P3 w/xp pro and MPLAB to work with my Junebug because it's just easy (ethernet cable to the net switch and usb to junebug). I'm also going to check out the Microchip C18.

Mike
 
Thanks for that info, I tried the Hi Tech and liked the chip setup wizard but the manuals leave a bit to be desired (at least for me re-learning 'c'). I do use Linux as my desktop and have heard there is some pic software out there but have not tried it yet. I use RDP (Remote Desktop) to an old Dell P3 w/xp pro and MPLAB to work with my Junebug because it's just easy (ethernet cable to the net switch and usb to junebug). I'm also going to check out the Microchip C18.

Mike

No problem dude. I love Linux too! What distro are you using? I use Arch Linux on my desktop and Ubuntu on my laptop. I also love the C-WIZ that HI-TECH provides. I never thought much of it at first, then I tried it and it makes everything a whole lot easier, especially when you're using an unfamiliar chip.
 
Last edited:
No problem dude. I love Linux too! What distro are you using? I use Arch Linux on my desktop and Ubuntu on my laptop. I also love the C-WIZ that HI-TECH provides. I never thought much of it at first, then I tried it and it makes everything a whole lot easier, especially when you're using an unfamiliar chip.

I printed out a few pages from the MCC manual on the I/O and going to give that a try.
I use openSuSe for the desktop, and I have a machine that runs Centos for some ham radio stuff. I want to do a few projects that I can use with my radio gear, digital in's to monitor status, and the analog in to monitor power supply's and etc and send it via rs232 to the computer. A while back I saw a software package that would take the serial data and send it over the network to another machine, kinda sorta what I want to do.
Mike
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top