Skip to main content


This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - BrianGriffin

General discussion / Re: Do you think Raspberry Pi and Arduino is overhyped
Ah, that age old topic.

Personally, way before I knew of Arduino and RP, I started out programming on a PicKit 2 and the little board with 4 LEDs. With very limited tutorials. I had to mess around with the registers, play around with the little instructions in the PIC16/18F and try cooking myself new things like "7-segment display counters" and "Christmas tree" projects. No libraries or whatsoever so I have to do my own writing.

As I know of these Arduino and RP, I never did much on them. I have an Arduino Due but I end up not using the libraries and tried to study the registers in the AT91SAM3XE datasheet and try to play around with the other components like DAC. I got the RP too for myself but ended up selling it to someone because there's nothing much I can do on it.

Since I will be starting my PhD, I can't even use RP or Arduino due to the tight budget of the projects which requires me to handwrite a lot of code for an automotive monitoring system (CAN bus and display GUI).

Still, I can't say Arduino or RP is not good - it's simple, deployable and workable for most people who are not into electronics. To be honest, I liked those Arduino shields which provides flexibility in quick prototyping.
Project logs / Re: PAW20 - LEDger Led (polarity) tester
[quote author="matseng"]I'll asked Ian for a giveaway for a few of these. So you'll have your chance of getting one for free. If you're not in luck you can soon get one from my Tindie shop  :-)

Well, almost.  I just grabbed a book from a bookshelf nearby and it happened to be a Swedish book from the late 60'ies (or possibly the early 70'ies) about typography.[/quote]

Thanks man. It's cool. :)

Btw, I happened to have old Rosetta Stone "Learn Danish" material. Didn't quite finished book 1 - it's terribly hard. Scandinavian languages are pretty difficult to learn and to master. :)
Project logs / Re: COLDES1 (COLlaborative DESign) - LCD 2 TV Out
I have these LPC thing also, won from a contest some years back. However, I haven't got a compiler to go with this one yet, and the board has an onboard programmer to go with.

If you can get the DMA to work right - driving the VGA or composite signal will be mostly correct. To sift out the correct information in a datasheet in other ARM microcontrollers is a tedious task.
Project logs / Breadboard version Bus Pirate and ST7920
Hello there,

Please notify me on PM if I'm breaking some rules - especially on the Bus Pirate.

Over this weekend I cobbled up a breadboard version of Bus Pirate with the extra stuff I have from the drawer (the main chip PIC24FJ64GA002 is there too), dumped the bootloader and dumped the rest of the firmware with a dirt cheap USB->UART converter I have. It looked ghetto, but it worked on a Serial HD44780 LCD.

So, I have an idea. I have the ST7920 GLCD which I have a grudge on. It's a fussy thing and it is pretty slow. Wrong command, you see garbled mess and garbage on screen. The serial was the worst - it couldn't catch commands properly if you are unsure of its serial specifications. Since I have that franken-Bus Pirate, why not experiment on it?

On the terminal, I experimented with what would the screen look like if I have to set a certain SPI speed, or set a certain response on the SPI bus. It took some while before the screen would spit out the correct output in a consistent manner instead of terrible garbage. In the end, I wrote a script in Python, and at the least, it showed some (meaningful) text.

Here's the pic, and all these scripts are commented on important sections. Have fun.

Project logs / Re: COLDES1 (COLlaborative DESign) - LCD 2 TV Out
[quote author="Bertho"][quote author="BrianGriffin"]About a year ago I used a PIC32 with SPI as a monochrome 1-bit colour VGA for pushing pixels. It is quite effective as the peripheral bus clock is fast enough.[/quote]
Two questions:
- How did you generate the H/V sync-signals?
- Did you use planar or interlace frames?[/quote]

I borrowed Lucio Di Jasio's "Programming 32-bit microcontrollers" book's example - it is for the composite video, and I have to modify it.

The H/V syncs are all done using Output Compare modules inside, and there are no interlacing. Since putting a 256x240 (this is a reason I choose this resolution - Nintendo Entertainment System uses that, and it's easier for me to relate), the screen on a 17" monitor is staying at the corner, so I have to adjust the DMA's streaming speed and zero-fill the sides for alignment. Plus, on the vertical side, I have to extend the lines so that it fills up the whole screen.

It's been a year I wrote this, and I find there are other alternatives to driving video better. Displaying video and doing the game code is not any easy. As I mentioned, that's why dedicated video controller exist.

Here's one of my toys I made for a contest: http:// This version is with 256-colour, and it is not using SPI. Instead it uses PMP (Parallel Master Port) with DMA. I find the PIC32's DMA module easier to understand and the datasheet for it is quite understandable, with examples for some important components inside.
Project logs / Re: COLDES1 (COLlaborative DESign) - LCD 2 TV Out
About a year ago I used a PIC32 with SPI as a monochrome 1-bit colour VGA for pushing pixels. It is quite effective as the peripheral bus clock is fast enough. Even on that, a PIC32 could drive 8-bit colour in 256x240 resolution using DMA for pushing pixels. However, the PIC32's data bus is narrow, and all the pixel pushing action already occupies like 90% of it, therefore any other work inside is limited. The Atmel AT91SAM3XE (Arduino Due's processor) has a few of those data buses (I don't know the exact name), so it would be simpler.

I'm not sure for the "updating the LCD panel" thing though, because these things are very slow, and you have to juggle between rendering on the monitor and updating the panel.

You will do well if you use 1-bit colour, and a small PIC32MX or an ARM Cortex M0/M3 chip.
General discussion / Re: Upgrade of MPLAB to MPLAB X
[quote author="matseng"]
Not in Kuala Lumpur proper, I'm like 500 meters into Selangor from the KL border at TTDI .  As a (former) Swede I have to be close to IKEA for my daily fix of pickled herring and crisp bread so we are renting a link house in Mutiara Homes just beside The Curve mall :)

Yea, I'm bascially open for selling and/or giving away stuff that I do.  It's just for fun anyways.[/quote]

Oh, just beside the Curve mall. I know where it is because it's like 7kms away from my place. Similarly, I'm nearby the KL border, but at the Kepong side. We often go to the Bandar Utama and its vicinity like a few times a month. :)

I was thinking of joining the Hackerspace KL which your blog has mentioned, but I can't see the Hackerspace KL website anymore. Hopefully the Hackerspace KL is active once again, can't wait to see some more projects from them.
General discussion / Re: Upgrade of MPLAB to MPLAB X
[quote author="matseng"]BrianGriffin & Xykon : I've installed MPLAB X and it feels kinda ok.  I'll have to try to get it integrated to Github as well, that would be nice.

I saw some warnings about problems with using it when debugging code on the chip?  Do I need to keep the old 8 for debugging?

The '1503 is a nice little 14 pin chip with a lot of fetaures and it's so cheap. Like $0.80 in 100qty!  Too bad they borked the pullups on port C, but as long as you're aware of it is't usually not a problem.[/quote]

Hey Mats,

I haven't got any warnings debugging a PIC32MX795F512L on using the MPLAB X, and these compilers need regular updating as they can be quite quirky at times.

The 1503 is a cool little stuff, I got to admit, but lacks of a proper fixed internal Vref. This thing, coupled with a DS18S20, is a pretty neat little thermometer.

You living in Kuala Lumpur? I'm in the suburbs. Saw some of your awesome projects, are these for sale? So that I can pick these up locally? Thanks.
General discussion / Re: Upgrade of MPLAB to MPLAB X
Hello Mats,

The MPLAB X is definitely a good upgrade over the previous venerable MPLAB 7.xx or 8.xx. Combined with the latest XC8, you won't go wrong with these.

You may still be able to use a Pickit 2 and the program using the XC8, but you need some extra steps. You have to dig in the hex file you compiled in the folder you specified earlier, and then when you opened the hex file, just click "Auto Import Hex + Write Device". My original Pickit 2 has been busted, so I have to use the Cytron's UIC00B (Pickit 2 clone).

I have made a few toys out of the PIC16F1503 using the XC8 and the MikroC themselves.
General discussion / Re: Big Box of Parts
Hello Matseng,

I'm also in Kuala Lumpur, have a bit of some microcontrollers and I'm also giving away one of my ST microcontroller kits into the box. Is it good? :)

Project logs / Re: Music Box / Wavetable Synthesizer / DDS
Dear Markus,

I like the port of that project to the PIC32. It's amazing. Keep it up.

If you put it in a wooden box and that magnetic plastic ballerina inside, you can actually fool someone that this is the real thing! :)