PDA

View Full Version : SEROUT + SERIN, OLED + PICAXE coding help required



SeanHowson
- 8th October 2012, 18:08
HI

I'm Sean :)

I'm new here, so, as it stands, my problem:

please note, everything is still in the planning proccess yet i have a very good idea of how im going to do things, im yet to actually buy components (since more often than not something will undergo a minor alteration, so everything i talk about is just a sketch on a peice of paper or in my head at the moment :P)

I'm building a motorcycle H.U.D. as a part of an A-level school project, i have, several serial outputs from various PICAXE components connected to other transducers and controls (e.g. i have a PIC in the main control box (mounted to handle bars) controlling the contrast setting or the small projction unit in the helmet so as not to dazzle the rider at night, the contrast/brightness information along with the speed is then relayed via a radio uplink to a small unit on the helmet which then changes the output voltage to the display in the helmet thus changing the brightness, this contrast control PIC also outputs the information regarding the current contrast as a Serial output which i would like displayed on the OLED screen i'll have mounted to the control box) i would like to effectivlely use one monster microchip that i think for now i'm going to call the "funnel" chip (just for ease) to condense all these serial outputs (like the one regarding contrast), into one, this one, will then go off to the OLED screen mounted on the handlebars, so the rider can have a look at things like battery level and other bits and bobs of information all to extensive to list here, (i'm displaying only speed in the helmet due to a few limitations and i dont want the product to be to intrusive to the helmet and require years of fidling and setup just to display stuff the rider doesnt need to always see)

im familiar with programming using flowcharts quite extensively however, the school are about to upgrade to PICbasic (or pro, i dont know which yet so i apologize if im in the wrong forum, but lets just say it's PICbasic for now) i'm not so familar with the language if someone could give me and example of a peice of code for my "funnel" chip which for example takes two serout commands from other PIC's e.g. the characters:

("A - 8/10") - this represents a contrast level when the unit is using it's "A"utomatic contrast control mode.

The serial from the second chip....
("mode-R") telling the funnel chip the device is in "road" mode (as apposed to "T" for "tear that rubber" mode... :D)

and then converts these (using the SERIN command needless to say) into a SEROUT wich will display (" A - 8/10 mode - R") on the OLED screen positioned wherever for now

if you could give some indication of how i position the text on the screen (i'm looking at using the 20x4 yellow text OLED on the PICAXE website) - effectively all it has to do (famous last words) is read two (in reality this will be several) serial outputs from other PIC's and chuck the information onto various corners of the screen (anwhere of your choice since youre writing the code) some explanation of what the different aspects of the code mean would be useful but throwing anything at me is also useful.



any (useful) answers would be greatly appriciated, sorry for the long message i know i still havent fully explained things, any questions please ask, i just need to gain an understanding of how to use serial commands really thanks for your time, i may upload a few doodles in a minute to try make things understandable.

kind regards
Sean

Acetronics2
- 10th October 2012, 11:06
Hi, Sean

@First ...

what is Picaxe ??? :eek:

does that " Picaxe" have any use ??? has it even ever existed ??? :D

you're NOT on the Picaxe forum here ... so help won't be what you are hoping ... :o

You better should post HERE: http://www.picaxeforum.co.uk/forumdisplay.php?2-Active-PICAXE-Forum

Alain

SeanHowson
- 10th October 2012, 22:47
i was fully aware of what forum i'm on... really... really helpful reply, good to see you read the entire post, clearly i am in the wrong forum since i'm talking to someone who hasnt actually heard of one of the largest manufacturers of micro controllers -_-

BobK
- 11th October 2012, 00:30
Hi Sean,

There are quite a few samples of using PICBasicPro using SERIN, SEROUT, and writing to a LCD Display on the
MELabs website. (www.melabs.com) You will find a wealth of information to help you get started. You can also download a smaller version of PBP to try some of them out. Even if you plan to use the PICAXE form of basic you can gain a good foundation for what you want to do. Using the SEARCH function of this forum will also help you out alot. Don't let anyone here turn you away. Most of this stuff is trial and error and using bits an pieces of other peoples examples will teach you what you want to achieve. On this forum we ask people to show us some example code and a schematic of what you are trying to do then show us what you are having trouble with and the help usually comes out of the woodwork.

Have a nice day!

BobK

Sorry, I missed the part about the programming language your school is providing. There are examples of
both PicBasic and PicbasicPro at melabs.com

Acetronics2
- 15th October 2012, 16:11
since i'm talking to someone who hasnt actually heard of one of the largest manufacturers of micro controllers -_-

Do you really think so ???

Picaxes only are Microchip MCU where macros have been ROM programmed !!!
soooooo much room lost just to sell captive devices ...


:D:D:D

Alain ... laughing about the " largest manufacturer " !!!