No output with Shift Module

Discuss the Firewing language

No output with Shift Module

Postby bitfogav » Sun May 12, 2013 5:57 pm

I'm trying to output a byte using the Shift module but I'm not getting any Clock or Output. Am I missing something?

Code: Select all
#option SHIFT_MAX = 8
#option SHIFT_CLOCK = 2

imports shift

const myValue = 160

Sub Main()
   high(D10)
   shift.SetOutput(D11)
   shift.SetClock(D13)
   shift.Out(LsbFirst,myValue,1)
   low(D10)
End Sub
User avatar
bitfogav
 
Posts: 75
Joined: Sat Nov 17, 2012 11:46 am
Location: UK

Re: No output with Shift Module

Postby David John Barker » Sun May 12, 2013 7:34 pm

I think another 8 bit library has sneaked into the distro - sorry about that. I've attached a new "shift.bas" library. Just overwrite the old one with the new version - you should be able to find it under:

c:\<install folder>\library

Can you let me know if it works OK for you.
Attachments
Shift.zip
(2.25 KiB) Downloaded 980 times
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: No output with Shift Module

Postby bitfogav » Sun May 12, 2013 7:55 pm

David John Barker wrote:Can you let me know if it works OK for you.


No this hasn't fixed it Dave :roll:
User avatar
bitfogav
 
Posts: 75
Joined: Sat Nov 17, 2012 11:46 am
Location: UK

Re: No output with Shift Module

Postby David John Barker » Sun May 12, 2013 8:45 pm

I'm sure this is the correct fix, it's tested hereOK. You need to

Close the IDE
Delete the previous shift library
c:\<install folder>\library\shift.bas
Find the MCU16 folder
c:\install folder>\library\MCU16
Copy the unzipped shift folder
c:\install folder>\library\MCU16\Shift\shift.bas
Restart the IDE

Again, let me know if this works for you...
Attachments
Shift.zip
(2.19 KiB) Downloaded 1025 times
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm

Re: No output with Shift Module

Postby bitfogav » Mon May 13, 2013 6:55 pm

Yes that fixed it this time David, there was no Folder Shift originally in MCU16.. :)

My Test Code:
Code: Select all
' Options
#option SHIFT_MAX = 8
#option SHIFT_CLOCK = 2

' Imports section...
imports shift

dim myValue as byte

Sub Main()
   myvalue = &HAA
   
   shift.SetOutput(D11)
   shift.SetClock(D13)
   
   shift.Out(LsbFirst,myValue,8)
           
   while true
   end while
End Sub


shiftTest.jpg
shiftTest.jpg (31.49 KiB) Viewed 10044 times
User avatar
bitfogav
 
Posts: 75
Joined: Sat Nov 17, 2012 11:46 am
Location: UK


Return to Language

Who is online

Users browsing this forum: No registered users and 6 guests

x