Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 14th October 2007, 09:30 PM   (permalink)
Default PIC16F84 and stepper motors?

Hello, I have just started thinking about micro controllers but have yet to get my hands on any compilers since so far the ones I have found go for around $200. I was wondering if any of you would now if this would work to control the steps for a stepper motor.

Code:
Poke TRISB, 0
loop:
Poke PORTB, 5
Pause 2
Poke PORTB, 9
Pause 2
Poke PORTB, 10
Pause 2
Poke PORTB, 6
Pause 2
Goto loop
End
I think it should come out as 0101, 1001, 1010, 0110 across RB0 - RB3 but since I have not yet gotten any parts and started experimenting with them I am unsure... Would that work if RB0 - RB3 where connected to the correct coils, probably through transistors for higher voltage.

Edit: Also browsing though this forum I see a lot of C, would that be a better language to learn than Basic?
__________________
Mechanical Engineers make weapons.
Civil Engineers make targets.

Last edited by 43617373; 14th October 2007 at 09:32 PM.
43617373 is offline  
Old 14th October 2007, 09:37 PM   (permalink)
Default

Learn assembler, it's easy (only 35 instructions), it's fast, and it's FREE!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 14th October 2007, 10:29 PM   (permalink)
Default

Quote:
Originally Posted by 43617373
Edit: Also browsing though this forum I see a lot of C, would that be a better language to learn than Basic?
This question could result in a language debate that could run for several pages. Let me attempt to nip that waste of time in the bud.

How good any language is depends on the merits of the language and the quality of the compiler.

A lot of people like basic and many basic compiler are capable of doing most anything you need to. Check the abilities and limitations of each. The fairly new Swordfish basic compiler seems to be gaining favor. It can be had with some very NIFTY tools that do everything from schematic capture to simulation. It is expensive.

A lot of people like C. C is more often used in the EDU and workplace. Some may disagree. There are several C compiler vendors that offer evaluation version of their compiler with limitations of some sort. The CCS compiler for example only works with 2 chips (16F877 is one) and you are limited to 2K words of generated code. You can do a lot with 2K.

If you go with the 18F series of PICs microchip has a free student version of their compiler that is limited only by optimization. (compactness of generated code).

As Nigel said learning assembler is a valid option.

In part what you choose to do depends on what you already know and where you want to go.
3v0 is online now  
Old 15th October 2007, 04:36 AM   (permalink)
Default

Thank you. Does anyone have any recommended books/websites for learning Assembly?
__________________
Mechanical Engineers make weapons.
Civil Engineers make targets.
43617373 is offline  
Old 15th October 2007, 04:40 AM   (permalink)
Default

Quote:
Originally Posted by 43617373
Thank you. Does anyone have any recommended books/websites for learning Assembly?
Yes, internet is more than enough. See Nigel's signature. I learn a lot from there.
__________________
Superman returns..
bananasiong is offline  
Old 15th October 2007, 05:04 AM   (permalink)
Default

If you look at the sticky at the top of this forum, it contains many links to tutorials etc.

For a free C compiler, I would recomend HiTech Pic C Lite.

Mike.
Pommie is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
control of stepper motor sanjivee Electronic Theory 22 5th October 2007 11:57 PM
PIC to ULN2803 to Stepper Motor Interface jenny1985 Electronic Projects Design/Ideas/Reviews 14 4th May 2007 05:30 AM
Need PIC16F84A Cool Project Agent 009 Micro Controllers 158 11th March 2007 07:15 AM
Remote Procedure Call (RPC) for PIC16f84 picfan Micro Controllers 1 13th August 2003 03:51 PM



All times are GMT. The time now is 08:57 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker