Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Swordfish Thread

Status
Not open for further replies.
I respectively disagree, they are most certainly between the keyboard and chair ;).

Actually i i am still in some shock having read his critique of your code, do me a favor......next time you want to help, please go slap yourself around the head until it passes.

You are right of course. But the Junebug problems amplified the fundamental problem.

Yeah, I definitely did not appreciate the ill-informed critique of "too much boolean", especially when I took the effort to explain every step in great deal.

I will follow your excellent advice!
 
If you're going to proceed with Swordfish on the Junebug then I found a code snippet that may help with debugging.

As you will remember Bill was very fond of charlieplexing and used it for the LEDs. This makes a simple job of turning on an LED a little more complex.

This is a sub in Swordfish to light LEDs 0 to 5.
Code:
Sub LED(num As Byte)
Const LedTris(6) As Byte =(%10111110,%10111110,%00111111,%00111111,%01111110,%01111110)
Const Leds(6) As Byte =(%00000001,%01000000,%01000000,%10000000,%10000000,%00000001)
    TRISA=LedTris(num)
    PORTA=Leds(num)
End Sub

Mike.
P.S. agree re Jon.
 
The biggest problem with Swordfish is the lack of debug facilities
What debug facility does it lack that anything else has? I routinely debug SF using the simulator/PK2/PK3/ICD3 in mplab just like I would with XC8. If you want to debug using a uart that's easy enough too.

I used MPLAB X with XC8. Don't think you can use it with the old IDE
XC8 v1.45 will work with mplab8.92, you just need to register the toolsuite by hand.
See https://www.microchip.com/forums/m1048431.aspx
 
If you're going to proceed with Swordfish on the Junebug then I found a code snippet that may help with debugging.

As you will remember Bill was very fond of charlieplexing and used it for the LEDs. This makes a simple job of turning on an LED a little more complex.

This is a sub in Swordfish to light LEDs 0 to 5.
Code:
Sub LED(num As Byte)
Const LedTris(6) As Byte =(%10111110,%10111110,%00111111,%00111111,%01111110,%01111110)
Const Leds(6) As Byte =(%00000001,%01000000,%01000000,%10000000,%10000000,%00000001)
    TRISA=LedTris(num)
    PORTA=Leds(num)
End Sub

Mike.
P.S. agree re Jon.
That's a good one I got a free junebug I wonder why..
 
I was enamored with saving I/O pins at the time (Charlyplexing).

I've also switched to MPLAB-X and XC8. Also MCC can both speed up and slow down the initial coding with XC8.
 
I was enamored with saving I/O pins at the time (Charlyplexing).

I've also switched to MPLAB-X and XC8. Also MCC can both speed up and slow down the initial coding with XC8.
Just THE MAN!!

Hi Bill, i got a couple of questions for you i will pm. as for charlyplexing i learnt alot from that.
 
As for Swordfish is it still being updated?
Apparently so, at least new chips are being added by tumbleweed i think.

I sent you a pm, do you happen to have a june bug schematic? searching the net gave me nothing
 
If I'm not mistaken, this mod' allows lighting LEDs 0 thru' 5 without affecting other I/O on RA2 thru' RA5 (maybe)?

Code:
'
' JuneBug Charlieplexed matrix on RA0, RA6, and RA7
'
Sub LED(num As Byte)
  Const LedTris(6) As Byte =(%10111110,%10111110,%00111111,%00111111,%01111110,%01111110)
  Const Leds(6) As Byte =(%00000001,%01000000,%01000000,%10000000,%10000000,%00000001)
' TRISA=LedTris(num)
' PORTA=Leds(num)
  TRISA = TRISA xor ((LedTris(num) xor TRISA) & %11000001))
  PORTA = PORTA xor ((Leds(num) xor PORTA) & %11000001))
End Sub
 
Thx Mike
As per normal, i still havnt got around to getting past installing sf! Time gets really short this time of year. The more i read on it however, the more i think it would suite the kids i teach. I had meant to start playing with it today, but Friday i had some jobs come in that have eaten my time. Worse still these are all service jobs so not paid for :(.

On top of that we upgraded the office computers and had win 8.1 put on and win 10 taken off, they took the old pc's in exchange and i have lost some the program files we had on them. My mistake for not checking they were going to take away the older machines.

I have a linux laptop i set up, only to discover simplicity studio wont run on it! So looks like it will become my microchip dev machine lol. If i can get the old version of altium working on it, well out of date now but was from way back on a laptop i got from school. No way am i buying a altium license!! Or a newer proteus one.

Had the first ever board i made and sold back on friday, they want some code updating. Looking at the board i am going to re design it and get a new one made before sending it back, its embarrassing looking at a board i made 4 years ago!! Nice soldering but the design is............ awful is polite. I wouldnt dream of sending it back lol besides i cant add the extra channel they want, i was stupid and didnt bring the left over pins out to a header.

Also looks like i was obsessed with straight lines and 90 degree corners :D, as for ground planes and copper fills....whats that? lol. Man i remember being so proud of that board when i did it, looking at it now i want to scrub my name off lol.
 
Status
Not open for further replies.

Latest threads

Back
Top