need help!

Information and discussion regarding the main Firewing development board

Re: need help!

Postby David John Barker » Fri Jan 10, 2014 5:29 pm

Thanks for letting me know Richard, I have updated the wiki here:

http://www.firewing.info/pmwiki.php?n=Firewing.Firewing32Beta
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: need help!

Postby richardb » Fri Jan 10, 2014 9:46 pm

I wasn't sure where to put this,

unless I missed it there isn't much if anything in the help regarding ports and trising them

I had to download the pic data sheet to work out what ports names to use.

I think there should be a list of port names associated with each pin name.



Richard
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: need help!

Postby David John Barker » Sat Jan 11, 2014 9:16 am

> unless I missed it there isn't much if anything in the help regarding ports and trising them

http://www.firewing.info/pmwiki.php?n=Reference.InbuiltRoutines#Input
http://www.firewing.info/pmwiki.php?n=Reference.InbuiltRoutines#Output

For example:

Code: Select all
sub main()
   output(D13)      ' make pin output
   D13 = 1          ' switch on LED
   delayms(5000)    ' wait 5 seconds
   input(D13)       ' switch LED off
end sub


> I think there should be a list of port names associated with each pin name.

I've added them to the bottom of this page:

http://www.firewing.info/pmwiki.php?n=Firewing.MainBoard
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: need help!

Postby richardb » Sat Jan 11, 2014 11:42 am

Again I didn't know that there was a predefined alias d13 to portb.14 maybe I should read the help again.

I'm not trying to be critical of the compiler as so far it looks really great.
but as far as I can tell firewing is aimed at people who want to jump straight into micros without having to look at datasheets for the device.

maybe its because I'm used to swordfish.

trising can be useful if you want to change the port direction for the whole port or maybe want to send data buy setting the output to low and have a pull-up on the pin then trissing data out for a tri-state bus with multiple devices on it.


what do other people think ?
richardb
 
Posts: 63
Joined: Thu Aug 01, 2013 10:40 am

Re: need help!

Postby David John Barker » Sat Jan 11, 2014 11:59 am

The Firewing boards use D0, A0 etc to denote pins, as that's what Arduino does - this ensures the shields can be used with Arduino and Firewing maintains this standard.

> maybe its because I'm used to swordfish.

If that's what you are used to, then use Swordfish notation in Firewing! (Firewing is built on Swordfish). For example, you can replace the previous example with:

Code: Select all
sub main()
   TRISB.14 = 0     ' make pin output
   PORTB.14 = 1     ' switch on LED
   delayms(5000)    ' wait 5 seconds
   TRISB.14 = 1     ' switch LED off
end sub


it is also perfectly legal to use:
Code: Select all
   TRISB = 0


with Firewing, like you would in Swordfish. Firewing has not removed any of this capability.

> but as far as I can tell firewing is aimed at people who want to jump straight into micros without having to look at datasheets for the device

That's true, I have tried to make Firewing as accessible as possible. However, Firewing is a PIC compiler, so you can do all the things you used to do with Swordfish with Firewing.
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Previous

Return to Main Board

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x