![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Can anyone recommend good books for programming PIC's in Basic with some simple projects.It seems alot of them are out of date or they only focus on programming and have no projects. Has any one read this? http://www.amazon.com/Programming-Mi...440281&sr=1-16 |
|
#2
| |||
| |||
| I would just checkout one of the more common Basic compilers (MikroElectronika at www.mikroe.com, or the Proton compiler)- each of which have a full functioning, free (compile size limited), downloadable environment. Both have a pretty large user base, where people have posted project code and participate in forums, and both come with sample code for most everything you need to know. The nice thing about these environments is that they ship with basic libraries that contain a lot of functionality- things like math functions, interfaces (RS232, SPI, I2C, etc), LCD display, etc- where this saves a ton of time as a programmer new to PIC coding. You are free to write your own functionality as you require (you can even insert raw assembly into the Basic body if you want!), but using the provided functions is a good way to get some results in hours vs. weeks. I found that the learning curve was a little steep because some of the core PIC stuff (terms like TRIS, CMCON, ADCON) are used without any explanation; these are fundamental concepts to the PICs, and most uCs in general, and I think authors tend to forget to start at the beginning. So, maybe download a compiler, open a sample project, and then spend a couple of hours Online figuring out what some of the native PIC commands actually mean. I think it would be difficult to read through a book or a PIC data sheet and have any retetion of what you have read- even 1 chapter later... Then, hit up the support forums- people are often very helpful. |
|
#3
| |||
| |||
| For something even better, http://www.oshonsoft.com/ and download PIC Simulator IDE While the name is a bit misleading , Program in Basic , Assembler plus Simulation of the program before even programming the chip: Then compile to hex file: Kym |
|
#4
| |||
| |||
| Kym, Not to tangent too far here- but Im curious. Most IDEs, including Mikroe's, have simulation, and also have In-Circuit-Debugging (to monitor actual MCU registers in real time during a run), but they all seem to suffer from a core problem- which is simulation of Interrupt-based events. Specifically, the timer-based interrupts for things like stepper timing are difficult because to simulate them, you have to let them run in real time, which is not practical to observe. This is compunded when you have an ISR that is managing multiple interrupt sources (i.e. a USART sending data to the MCU, and also a timer overflow to define a stepper sequencer, where you want to know if the USART function has time to process the data before the timer overflow fires to generate the next stepper phase). How well does this OshonSoft environment handle these more difficult simulation problems? Regards- R |
|
#5
| |||
| |||
| I don't want to step down on Basic, bu I'll do it anyway... ![]() Did you try YAL2? http://oase.uci.kun.nl/~mientki/data...2_release.html Regards, Sven |
| Sponsored Links |
|
#6
| |||
| |||
| Hi Sven Well, as a guy with a lot of C/ASM code in my past, Im not sure why people are anti-Basic. I mean, the front end GUI generally feeds a standardized compiler (standard for that developer) which generates the same opcode regardless. Yea, C is nice because the language is pretty well standardized, but from a performance perspective on a PIC, for a new user, I see Mikroe and Crown Hill's Proton as very competitive in terms of performance and code footprint, and are MUCH easier in terms of syntax. btw- the reference you provided seems to be limited in that it does not support PIC18 or dsPIC parts. Not sure how that is a positive considering the significant limitations of the PIC16 (memory paging, native functionality). Regards, R |
|
#7
| |||
| |||
| www.picbasic.com Great resource for anyone programming pics in Basic. They have a section with sample programs as well as a great forum. I have also had good results from the programmers that they recommend. |
|
#8
| |||
| |||
| Also look at PICFORGE is Really Exceptional!!! THIS IS THE SITE: http://www.4shared.com/file/6750221/...e_Pro_206.html |
|
#9
| |||
| |||
| about the best you'll get is the pic simulator ide from oshonsoft, it supports most of the commonly used pics right up to the 18f's don't waste your time with mikroelectronica it seems to produce iffy code for some of the pic however if you want things even simpler goto www.picaxe.co.uk |
|
#10
| |||
| |||
| Iffy code? Not sure what that means- ME produces very good ASM for compilation. Yes, some of their functions could be optimized (and if you want to, you can just write your own in basic or as inline ASM), but they have a lot of native functionality that works with a very broad PIC spectrum- all the way through dsPICs. Having used a number of compilers in the past, I can say that the ME product produces solid code in a reasonable footprint, and is very easy to learn relative to some other IDEs. And, their tools make design/debugging much easier (i.e. EasyPIC4 dev board, with native ICD). Anyway- there are a number of solutions out there, thankfully, and they are getting beter. But dont discount ME as waste of time; far from it, I consider it the best of the current gen Basic to PIC IDEs. The better IDEs have free demos, so why not try a few- see which have the native functionality you want, and maybe narrow down to a couple of candidates so you can compare PIC support, compiled code footprint, ICDs, etc. |
| Sponsored Links |
|
#11
| |||
| |||
| If you look for a compiler that produces optimized assembler and comprehensible, not impossible as that of mikroelettronica, test picforge is free http://picforge.interfree.it |
|
#12
| |||
| |||
I'm R&D developing all day long, and I did put a blinkin' eye in the end. Right? ![]() For most applications Basic is more than enough - I totally agree with you, but after a while even the least curious hacker wants something more. I didn't post the link to YAL to rack down on Basic, I added it as an alternative. Regards, Sven |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic dimensions? | cdlenterprises | Solidworks | 4 | 01-30-2007 12:49 PM |
| Basic Questions | NinerSevenTango | FeatureCAM CAD/CAM | 6 | 01-05-2007 10:53 PM |
| REALLY basic Question | Dongle | Mechanical Calculations/Engineering Design | 25 | 03-14-2006 04:47 PM |
| How is VisualMill Basic | bgolash | Visual Mill | 6 | 01-02-2006 07:02 PM |
| Basic questions (new guy) | mattsgarage | CNCzone Club House | 12 | 04-08-2005 02:27 PM |