Production has started…

Our new PCBs are in. Loving the red boards!

This is the first time we are going with the red soldermask but we decided it was the best way to go for giving our boards a more “finished” look.  A few boards are soldered as shown above for testing purposes before going ahead with the large scale production.

What you see are OLED boards(top) designed to be stackable with our new PIC32 chip (100pin flavour) boards(bottom). You can see how it stacks in the images above. This time, there’s enough ADC pins to go around as compared to our previous 64pin chip boards.

Here’s hoping the entire process goes smoothly so we can get this released to the market soon.

PSP Joystick Project (PART ONE)

PSP Analog Stick

PSP Analog Stick

A couple of months back I came across these PSP analog sticks that were meant for replacing the ones in the first generation PSPs. (PSP1000) I thought it looked great, the connection pads were at the back and frankly i thought it looked better than the ones that were used for the subsequent generations of PSPs. So I purchased a couple and thought it’d be useful for some pet projects later on. So when we decided to have an internal “Show & Tell” at the workplace, I was like, Hey! Perfect excuse to start using the analog stick. I had plans to use it to control a Robot’s movement, but first i wanted to see the values plotted visually on the PC.

The Setup

The Setup

This is how the setup looks like. Please ignore the LEDs and resistors and the whole bunch of wires on the left side. They’re a test bed for something else. It’s a four wire output from the Analog Stick; High, Ground, X & Y axis. So basically only 2 I/O s are required.

Analog Stick Pinout

Analog Stick Pin Out

The pinout for the PSP Analog Stick is as shown above. Dead Center would be about 2K ohms on both X &Y axis. If you’re using  a multimeter to check for the connections, the values would read 4k ohms on the X & Y. These values drop once you input power.

So i wanted to see how the values change visually on a screen. I first had to get the readings from the sensor. To do this i connected it to an FI Board, in this case an FI40 Board, wrote about 2 lines of code to get the readings on X and Y, and then had it displayed on the debug window. I later replaced the debug statement into serial package commands for the PC.

The whole code in FIDE came to this:

Take note of the 2 lines in blue, that is all that is required to read the values from the pin.

'Module1
Public Const pinX As Integer = 2
Public Const pinY As Integer = 1
Dim X As Integer
Dim Y As Integer

Public Sub Main()
High(pinX)
High(PinY)
Delay(50)

	'CENTER POINT
 X = GetAdc(pinX) Y = GetAdc(pinY)
	OS.Comm1.TX(255)
	OS.Comm1.TX(0)
	OS.Comm1.TX(HI(X))
	OS.Comm1.TX(LO(X))
	OS.Comm1.TX(HI(Y))
	OS.Comm1.TX(LO(Y))
	'Debug.Print CStr(X); " "; CStr(Y)
	Delay(1000)

Do
	X = GetAdc(pinX)
	Y = GetAdc(pinY)
	OS.Comm1.TX(255)
	OS.Comm1.TX(1)
	OS.Comm1.TX(HI(X))
	OS.Comm1.TX(LO(X))
	OS.Comm1.TX(HI(Y))
	OS.Comm1.TX(LO(Y))
	'Debug.Print CStr(X); " "; CStr(Y)
	Delay(250)
Loop

End Sub

I noted down the maximum and mininum values of both axis, and started programming over on VS2008 (VB.NET) to do the visual plotting.

Analog Stick Values Plotted in VB.NET

Analog Stick Values Plotted in VB.NET

I made the FI40 send the values from the Analog Stick through the UART to the PC using the same Communication Key that was used for downloading FI programs to the chip, and plotted these values to the screen as well as on the track bars. The first reading is taken as the new center point. Please note that the analog stick’s center point is not the same each and every time, however it will always be in the range of 2k Ohm +/- about 200-300 ohms. As such, you will note in the video below that when it jumps back to center, it might not necessarily be dead center but it will always be within the inner circle.

more about “PSP Joystick Values plotted in VB.NET…“, posted with vodpod

VB.NET Source Code coming soon. Watch this space till i get it uploaded.

Download the VB.NET Source Code Here.

FIDE v1.4.2 Release 2

FIDE now stands at v1.4.2 with the promised updates for the FIDE tools. You can download it from AIS Cube here.

SD Tool:

  • Now features double the maximum number of files per cluster you can have. 1024 files for maximum goodness. sweeeet.
  • Application Notes for an in-depth walk-through available for download and viewing online.

Data Comm. Tool:

  • Added Programmable Hotkey functions.
  • Improved bells and whistles of user experience. More updates at the next release.
  • Application Notes for the Data Comm. Tool available as well for download and viewing online.

Look forward to the next updates and have a good weekend!

New Server and Bluetooth Documentation v1.1

If you guys haven’t already noticed the big change in the outlook of our website and forum, you must have been missing out on the action. We decided to have a new website design to mark our successful migration to the new server and it looks really pretty in fact. A whole lot brighter too compared to the really dark theme we had initially.

The forum is currently empty since we have been really busy in the office with the amount of WORK to do, so please be patient with us while we repost certain items. But please go ahead and post a comment if you require assistance, have a bug report, a wish list and whatnots.

Aside from that, we have updated the FICE EBlue Documentation with code for integration with the FlamingICE. So it stands at v1.1 until we decide to add more stuff.

Thats about it for now. Release 2 for FIDE v1.4 (making that v1.4.1) is due for release sometime soon. You can expect hot-key enabling and code cleanup for the Data Comm. Tool.

FIDE v1.4 released!

FIDE v1.4 is now available for download!

We changed the install location of the documentations to its own folder in your computer’s <My Documents>. So that should make it easier on you when you need those help files. New FICE eBlue Bluetooth Documentation added! Makes an interesting and important read on how you can make your applications wireless.

We haven’t gotten round to putting this in the documentation but please do take note especially when you’re using the FTDI comm key. Once you’ve set your Comm Key settings and opened the port, it is not recommended to plug out the Comm Key while FIDE is still running. This will cause the application to crash. Especially when you’re in the midst of downloading.

Why is this? You’d probably ask. Think about it for a moment. It is only possible to open the port when the serial device is attached to the COM Port. When you open the port in the FIDE and you plug the device out, this port disappears. You can see this if you leave your device manager open. Try plugging the Comm Key in and out and you’ll see what i mean.

Okay, Say you have connected your FI board to your PC through the Comm Key. And your FI chip has a program onboard from your previous downloads or something, and even if the chip is new, the FI OS on first use would transmit data through the UART to signal that it’s working. So there is definitely some data that you can see in the debug window of FIDE(assuming you opened the COM PORT). Now, while the FIDE is running and reading the data that is being sent through the port and you plug out the device, this means that the port is forcefully “closed” or rather, it becomes non-existent and the Comm Port can no longer be accessed even if the application does not crash/hang.

The only work-around we can recommend is that you do not plug out the Comm Key while the port is open or in use (meaning some transmission is going on).

FIDE v1.3 released!

It’s been a couple of days since FIDE v1.3 has been put up on the net for downloading but i haven’t gotten around to announcing it and such.

FIDE v1.3 is an improvement from v1.2 where i mentioned in the previous post that the bugs found while using structures have been fixed. And! The release of FIDE’s System Library v1.2 is a huge leap in improvement with the amount of changes that have been done. All the instructions that are available for use, its explanations and example codings are all there.

Work is ongoing for doing up a complete walk-through for new users to FIDE. So you might wanna keep a look out for that.

Updates!

Within a week of posting the workarounds for a couple of bugs in the structures as stated here and here, they were fixed (thats efficiency for ya)! New version with bug fixes will be releasing soon, along with added features and other bug fixes in the FIDE tools. AND! FICE System Documentation v1.2 will be up soon with loads of example codings and explanations as compared to the v1.1 release. So keep your eye open for it.

Users still using v1.2 till date can still take note of the workarounds until the next release.

(Release dates TBA. )

FOR…NEXT loop

The FOR.. NEXT loop has got to be my favourite control structure of all time. Just something to take note of though;

The control variable MUST be a local or publicly declared variable. The use of a variable that is called by reference is not allowed.

What i mean by control variable is this:

Example:

Dim i As Integer i is the control variable

For i = 0 To 100

‘Statements Here

Next

Tip of the Day:
As everybody (well, almost everybody.. okay fine, programmers) knows, the use of the select case statement is similar to that of using an If..Elseif…Else..End If statement, however, if you’re into boosting the performance rate of the FI and optimizing your code for the best results, a good practice would be to use the If..Elseif..Else..End If statement instead of the Select Case statement for faster results. But in certain cases it really is easier to use the Select Case statement. But that depends on the individual programmer’s preference.

Select Case.. End Select | If..ElseIf..Else..End If

FIDE v1.2 has officially launched!

Meanwhile…

Do take note that while doing this is fine…

Select Case word

case 178 ‘Who

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

case 124 ‘What

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

case 128 ‘When

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

case 218 ‘Where

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

case 255 ‘Why

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

case else

End Select

Having a commented line on its own in between the cases will trigger a syntax error.

Example:

Select Case word

case 178 ‘Who

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

case 124 ‘What

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

‘something like that <==============

case 128 ‘When

keyWords(kwInt) = RDAT(sInt)

kwInt = kwInt + 1

typeState = 1

case else

End Select

And you should always, ALWAYS have a case else right at the end before you End Select.

Speaking of ‘else’;

Something else (no pun intended) that you should take note of would be the IF.. ELSEIF..ELSE..END IF statement, is that it HAS to be in this particular format, unless you’re just using IF..END IF.

So yeah. Till next time!

Follow

Get every new post delivered to your Inbox.