How do I get started?

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

Post Reply
vkmaynard
Registered User
Registered User
Posts: 11
Joined: Tue Sep 14, 2010 3:17 pm
Location: Apex, NC

How do I get started?

Post by vkmaynard » Thu Sep 30, 2010 2:57 pm

Jon has been very helpful and patient. I have his fully populated TAP-28 with a 18F2520 chip. One LED is set up to light.

What do I do next? I have the PICKit2 programmer.

MPLab crashes with an error:
---------------------------
MPLAB IDE Project Manager
---------------------------
Project Manager's initialization failed: At least the MPASM toolsuite plugin or ASM30 toolsuite plugin must be installed. (MPLAB IDE may need to be reinstalled.)
---------------------------
OK
---------------------------

Do I use just Swordfish? What include files are required and where do you get them? I wanted to start by simply blinking an LED to verify the HW. Then I would like to see how the debugger works. Is there a difference between "in circuit" and an PC interface debugging? How does Swordfish tie into MPLab? Is MPLab necessary?

Next I would like to communicate with the PC (I have the USB UART device) and step thru a parser to see if it is working using the debugger. I would like to then like command different LEDs on, control a servo, read two Hall sensors and write data back to the PC.

Thanks for any help in advance. I can't wait to try this tonight after inventorying an solder till midnight last night.

Victor

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Sep 30, 2010 5:56 pm

Looks like the folks at DigitalDIY have you pretty much sorted...

http://www.digital-diy.com/forum/viewto ... f=12&t=668

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Post by Jon Chandler » Thu Sep 30, 2010 6:13 pm

David,

Please correct me if I'm wrong. Swordfish installs everything it needs to work, without separately installing MPLAB?

I believe this is the case from a recent installation on a friend's computer so that he could edit code if needed on a remote project.


And I believe if the PICkit 2 GUI is used, MPLAB isn't required either.


It might be nice to have at some point, but to go from opening the box to flashing an LED, the simplest path is the best start.


Regards,

Jon

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Sep 30, 2010 6:23 pm

Yes, Swordfish installs everything it needs. However, if you want to use newer devices you will need to install MPLAB to get the latest MPASM. In the latest version of the compiler, deleting MPASMWin from the bin folder will force swordfish to use the version of MPASMWin installed with MPLAB.

You may have also noticed that other compilers that depend on MPASMWin are now having to ship with MPLAB - this is required by Microchip and we have to do the same.

In summary: If you are just starting out - keep it simple and build from the IDE.

vkmaynard
Registered User
Registered User
Posts: 11
Joined: Tue Sep 14, 2010 3:17 pm
Location: Apex, NC

Debugging

Post by vkmaynard » Thu Sep 30, 2010 8:05 pm

I will follow Jon's example tonight.

So how do I debug? That is one of the first tools I will try to run after the LED blinks. What do I use for debugging, Swordfish or MPLab?

This is a new install on my development computer. I have NO idea how all the parts fit together.

I write software apps for a living, develop SQL server apps, run servers, etc but do not develop HW.

Hopefully there is step by step documentation somewhere on how to get started (like Jon published on my question).

I REALLY like the look of Swordfish. Looks like what I use daily.

Thanks,

Victor

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Sep 30, 2010 8:10 pm

username updated as per request

vkmaynard
Registered User
Registered User
Posts: 11
Joined: Tue Sep 14, 2010 3:17 pm
Location: Apex, NC

Post by vkmaynard » Thu Sep 30, 2010 8:24 pm

Thanks David.

Are there UART Read/Write examples somewhere?

Victor

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Thu Sep 30, 2010 8:31 pm

I would stick with USART. Try the samples supplied with the compiler:

Echo.bas
TextAndNumbers.bas


Also try having a look around here:

http://www.digital-diy.com/home/swordfi ... mples.html

vkmaynard
Registered User
Registered User
Posts: 11
Joined: Tue Sep 14, 2010 3:17 pm
Location: Apex, NC

Great Product David!

Post by vkmaynard » Fri Oct 01, 2010 8:45 pm

So far I am amazed at how easy you made hardware development.

I have the TAP-28 switches and LEDs working. USART sending "Hello World" to the PICKit UART. Next is to send commands to the USART to toggle LEDs and read the Hall sensor on the supplied pins. Very fun and interesting. Job security killer.

Now I need to figure out best practice on running multiple loops (7 including the main).

Great Product David!

Post Reply