Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Help with PIC16C54/ 16C57 please.
Author | Message | ||||
YT2095 Newbie Joined: 07/02/2012 Location: United KingdomPosts: 22 |
Does anyone here have any experience with the PIC 16c54 or 16c57 chips at all? I have a complete set with programmer, manuals, s/ware, and ICs. I`v read all the manuals that came with it a few times and I`m still left with the problem of How to write a program for them? the s/ware is running on a Win98 machine so the Parallel port will work 9all s/ware was on floppy too), I can program the HEX files that came with the s/ware as a demo using PICALC, and all works just great. the problem is How do i even try and write my own source code so the ASM compiler can do its thing? there`s no IDE per se, there is a Simulator (PICSIM), but that`s just what it says on the box, so I`m Really Stuck here :( all I want to do, is read in 4 bit Binary data on TRIS A, and convert that to the equiv HEX 7 Segment LED display on TRIS B. not exactly a "Rocket Science" program, and yet I can`t even get started as there`s no clear indication of Where one would start? Anyone? |
||||
Olimex Senior Member Joined: 02/10/2011 Location: BulgariaPosts: 226 |
oh my these were the first PICs from Microchip which I used loooong time ago C series are OTP (one-time-programmable) so make sure you know what you do before program them no C, no debugger, just assembler and simulator if your code increase and move to the second bank of memory you set and clear page banks before and after every memory access instruction, crazy! ...and I have seen Chinese DMX controller with 12 potentiomaters and many LEDs and buttons multiplexed and implemented with single PIC16C57 I didn't want to believe my eyes when I saw it, the author should have spent months to implement it. so generaly these are PITA, just throw them in the garbage can I would recommend you to switch to something more decent like $0.60 PIC16F1503 at least it's Flash and you can work with debugger |
||||
YT2095 Newbie Joined: 07/02/2012 Location: United KingdomPosts: 22 |
I have these in JW too, so I can prototype, and erase under UV without a problem. also I have over 150 of these brand new ICs, I`m not trowing them away. in effect the code I want is simply a lookup table, input X gives me 7 segment output Y. this can be done with a simple EPROM alone, so a PIC chip should be quite capable of this too. anyone else? |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
I don't have example code for you to try, but a book like "Programming and Customizing PICmicro Microcontrollers" by Myke Predko might be great help for you. That type of book has a lot of assembly examples for simple input/output. Micromites and Maximites! - Beginning Maximite |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Hi Try this http://www.melabs.com/ This will allow you to use basic I have used the previous version with great success I did this with it http://www.youtube.com/watch?v=QE1TibaLj3o Jman |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
You can just write the ASM in any text editor (even notepad), then use the Microchip tool(s) to assemble it and turn it into a HEX (or BIN) file. There are plenty of programmers to put the HEX (or BIN) into the device. The instruction set is truly awful IMO but if you like a challenge... John |
||||
elproducts Senior Member Joined: 19/06/2011 Location: United StatesPosts: 282 |
Can you share the code? I'd like to see how you did that rolling affect on the numbers. That looks great. www.elproducts.com |
||||
YT2095 Newbie Joined: 07/02/2012 Location: United KingdomPosts: 22 |
well it`s certainly a comfort to know I don`t need anything additional to get one of these little beasties to work, Notepad I can do :) and yes, you`re quite right about the instruction set (of 33 mnemonics), give me Z80 Machine Code anyday! the whole topography reminds me of a Half-Built CPU with added RAM to make up for it :) I`m sure it can`t be That hard to code though, if a simple EPROM can do the job as a state machine. I think I will have a look at this MELABs stuff, perhaps writing in BASIC may be a little easier (as long as I don`t have to jump through too many hoops to get to that point). unless of course anyone here already HAS some code that will take 4 bit binary input and turn it into a 7 segment LED HEX display? |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Jman Sure it was done in PicBasicPro Not very pretty to look at but it works John2012-02-11_055648_wib-scroll.zip |
||||
aargee Senior Member Joined: 21/08/2008 Location: AustraliaPosts: 255 |
Looks like something Art did here... Rolling LCD effect I used Picaxe code to run my WIB LCD. - Rob For crying out loud, all I wanted to do was flash this blasted LED. |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Yip thats were i got the idea from :) John |
||||
Print this page |