Touch screen Remote control

Let everyone know about your works in progress

Touch screen Remote control

Postby Maelstrom » Tue Nov 18, 2008 5:16 pm

Hey everyone!

Posting here to talk a little bit about my project and ask for suggestions or help if anyone has done this before.

I'm making a touch screen remote control that will interface with model trains for a college research project. It's a bit pertinent to this site because some of the future expansions on the project may include making the controller wireless. At the moment, the controller talks SPI to the touch screen, EUART to the train controls, and Parallel Slave Port to the LCD. The chip is a PIC18LF4620 (LF because this is a 3.3V system). In addition to this, the system will have a working backlight for the LCD, and a reset function. Ideally, the wireless expansion would consist of one of the NRF transmitters and a PIC on both ends. Each end would connect to a DB9 EUART or perhaps later a USB EUART or even both if a PIC could be found that would do it. The PIC on the wireless modules would establish a wireless communication channel by taking the input from either end, encoding it with the PIC, and sending it on wireless. But, I am getting ahead of myself - I am still on the base controller.

I'll be posting some questions later on once I look through the code available on this site, but off hand is anyone here very experienced with SPI or the Parallel Slave Port on a PIC?
Posts: 1
Joined: Tue Nov 18, 2008 4:55 pm

Re: Touch screen Remote control

Postby brennen » Tue Nov 18, 2008 6:31 pm

If you go to the main site ( ), all four of the nRF24L01 tutorials include code for the PIC18F452, and included in that is setup routines for the SPI and UART. If you use C18 (which is a really sweet compiler overall), it has built-in routines for interfacing with all of the peripherals on your respective chip. The only thing with those libraries I've found is that the SPI read routine they had didn't work how I wanted it to, so I wrote my own.

I haven't ever used the parallel slave port on the PIC, but I don't think it does what you think it does. The reason it's called the parallel slave port is that it is meant to be a slave to some other microcontroller, CPLD, FPGA, etc., in that the other device can read from/write to the PIC. The PSP doesn't have any master capabilities as far as I can tell in the datasheet, so you would basically have to emulate it in software. You would still use PORTD as your data bus, but you would be free to choose the pins you wanted to use as the control signals (and you would have to operate them, too).
Site Admin
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Return to User Projects

Who is online

Users browsing this forum: No registered users and 1 guest