Question about PIC's, programmers, and BASIC
Im starting to learn PIC and I'm try the BASIC approach, since I have some knowledge of BASIC. Anyways pretty much the only place I've seen that does BASIC PIC method is MicroEngineering Labs. But basically heres my question. I can use any compiler that can convert BASIC into machine or HEX code? And then once I have that HEX file I can use any programmer to flash the PIC? So like if I use MicroEngineering labs compiler software I don't necessarily have to use MicroEng.'s programmer. I ask this because some of there stuff is DOS and uses a parrallel port, where as some other programmers have Windows interfaces and can even use USB ports.
I mean I could go buy some $40 Pentium computer off of forsale.dfw which would work great as a standalone. But I want to know my options before I plop the $150 down to get the boards and software
Also anyone have any good online sources for programming PICS with BASIC...I have a book that I bought, however I was just looking for other references.
I think I might use one of these compilers
BTW, these PIC's seem like a god send...they seem so damn versatile and super cheap once you get the intial hardware...I'd rather spend a week programming that $50 on a bunch of relays and trick switches and wiring.
Well it looks like if I hang out on the MELabs site for a while they have lots of info plus a message forum.
PICS are a fantastic tool, you can do some incredibly complex tasks witht hem once youve gained a little experience.
You should be able t use a combination of any compiler and programmer, just check to see if they agree with their respective formats. EG .hex files.
You can build your own pic programing boards for an extremely small price, I cant link you but have a google. BAsically there are a few small open source programs around, and all you do is wire a protoboard and a few components to a serial port.
I highly recommend learning the c approach to PIC programming, its not got a fantastically hard learning curve, and is bound to be immensely better documented than the basic approach. Even programming with assembler is not that hard.
Forget about Basic, you cannot do much with it. It is a bad programming language if you want to do something substantial. And it is difficult to unlearn bad habits :clown:
Go for C and with this kind of MCU’s assembly coding is also often a need. There are loads of free tools and app. notes on the net.
If you are interested in learning the basics of a PIC i recommend either of the following the following.
1. Buy one of the many $40 programmers you can find online (making your own could be the cause of many newbies' nightmares) , learn C, use MPLAB's compiler and IDE, use the 16f84A chip. This is the cheap, easy, low power way to learn.
2. Slightly more costly, yet far more powerful is to purchase the ICD2 (an inline programmer and debugger ... runs about $160). Learn C, use MPLAB's C-18 compiler and IDE, and either use the 16F877 or 18F452.
While the second option will run you $160 and $10 per PIC, the programmer is very versatile for future's sake (its burning software can be easily upgraded when new chips come out) and the biggest advantage is that you can step through your software one line of code at a time to debug. While this may not sound important as a fresh beginner, it becomes very important once your software becomes fairly complex. the 16F877 and 18F452 are very well documented and you can find loads of source code for each.
Re: avoid Basic
i use complier (code), and i learnt it from the tutorials on the winpicprog website.
i have this (http://www.quasarelectronics.com/3096.htm) programer from here (http://www.quasarelectronics.com/pic_programmers.htm).
it is £15.95, assembled, so about $20, i think. i couldnt afford a £200 debugging one. :(
can anyone here recommend a good free C compiller?
I took a class at school for learning to program the PIC18F452. It is a fairly powerful chip. I really like using this PIC by Microchip. the book that was used for the class is titled Embedded Design with the PIC18F452 Microcontroller. I found it to be a very good book for learning how the microcontroller works, and is based on assembly. The book also comes with a pcb to build a development board (called QuikFlash), and the parts kit for this can be ordered from Digikey for $56. It is a great platform for developing on. I used this for my latest project, building a CDPRO2 cd transport . I used C for all the programming for my latest project, but I found the learning initially in assembly allowed for a greater understanding of how everything works, and lead to more efficient C coding.
Another good feature of using the QuikFlash dev board, is that there is a free serial bootloader written for it, allowing easy programming of the device using a standard PC serial port. This saves the cost of having to buy an ICD2. You won't even require a programmer. When you buy the parts kit, you can mail the chip to get programmed with the QuikBug bootloader code to the author, and he will program it and mail it back to you for free.
In terms of the C compiler, if you are a student, you can get a copy of the CCS C compiler for free. I have been using the HiTech C compiler, since this is what the school uses for their labs.
More info on the Book and board that I used:
The digikey part number of the kit is 18F452-KIT-ND I spent about $120 for both the book, and all the components for the board, and it works great.
As far as coding in Basic, I have played around with the PIC in assembly, C and Basic, and Basic is by far the worst way to program the PIC. The code structure doesn't map nearly as efficiently to assembly as C does. I also feel that using Basic leads to bad coding habits. C is definately the way to go for ease of coding, but I still like the idea of learning the assembly method first.
|All times are GMT. The time now is 08:16 PM.|
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio