This is a port from the Casio CG50 that is on going on this thread / post, which consists in a Electronics Calculator for some components and currently is being developed on TI CXII-T non-cas :

It will provide same functionality as the Casio and is written in BASIC, please read the description on the link for further details.

For now just Resistive Diivider:

- Vout= Vin*(R2/(R1+R2))

- Added simple / single condition for zero input for typing error
- Approximate result for Vout.
- Use optimization sugested by Izder456 for Disp value in same line... not seen in the manual... Thanks


- Added link for git repository for future updates for now on



Define rdiv()=
:Disp "Resistive Divider"
:Request "Vin?",vin
:Request "R1?",r1
:Request "R2?",r2
:If r2=0 Then
: Disp "Error Div Zero"
: Goto end
:Disp "Vout="&string(vout)
:Lbl end:
:Disp "End"

Later i'll put on git repo for further and easier updates:
Is this in Ti-BASIC?
If so, this could be ported to the older nspire's like the ones you see in schools [or at least mine]


EDIT: oops didn't read guess it IS in Ti-BASIC, and it can be ported, with the loss of colour... oh well.

the code could be optimised to this :


Define rdiv(vin, r1, r2)=
Disp "Resistive divider"
// Request "Vin?",vin <--can be passed in as arguments
// Request "R1?",r1  ^^
// Request "R2",r2  ^^
Disp "Vout="&string(vout)
// Disp vout // dont need this anymore because of string appending with &
Thank you for you're attention and optimizations. i'm fairly new to the BASIC and just getting started. i'll update the code later on
malagas_fire wrote:
Later i'll put on git repo for further and easier updates:

link to repo?
Izder456 wrote:
link to repo?

It's on the description of first post:

I've updated recently and added a crude menu using text to represent menu choices and a Request input . Also added the R2/(R2+R1) approximation. it is now faily close to the original one on the Casio CG50.
Update on repository :

- Added know list of resistors values.
Update: Added Resistor Color Codes as Option 3
Added some pauses between resistor color codes using getKey(1), to mimic Disps as in the CG50
malagas_fire wrote:
Update: Added Resistor Color Codes as Option 3
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum